当前位置: 首页>>代码示例>>PHP>>正文


PHP Ticket::where方法代码示例

本文整理汇总了PHP中Ticket::where方法的典型用法代码示例。如果您正苦于以下问题:PHP Ticket::where方法的具体用法?PHP Ticket::where怎么用?PHP Ticket::where使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ticket的用法示例。


在下文中一共展示了Ticket::where方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: userticket

 public function userticket()
 {
     $userticket = Ticket::where('account_id', '=', $this->account_id)->orderBy('id', 'desc')->get();
     if (count($userticket) != 0) {
         return $userticket;
     }
     return null;
 }
开发者ID:testoodoo,项目名称:OoodooSiteUp,代码行数:8,代码来源:CusDet.php

示例2: get_tickethash

 public function get_tickethash($hash)
 {
     $ticket = Ticket::where('hash', '=', $hash)->first();
     if (empty($ticket)) {
         return Redirect::to('/#moduleSupport')->with('topmessage', 'Invalid Ticket Hash. Please enter your ticket ID and email below to locate the ticket.');
     }
     $email = $ticket->email;
     $ticketid = $ticket->id;
     return Redirect::to('/#moduleSupport')->with(array('ticketemail' => $email, 'ticketid' => $ticketid));
 }
开发者ID:A-Lawrence,项目名称:VASOPS,代码行数:10,代码来源:IndexController.php

示例3: index

 public function index()
 {
     if (Auth::user()->role === 'admin') {
         $tickets = Ticket::paginate(2);
         return view('tickets.index')->withTickets($tickets);
     } elseif (Auth::user()->role === 'tech') {
         Session::flash('flash_message', 'your not admin!');
         $tickets = Ticket::where('tech_id', '=', Auth::user()->id)->paginate(2);
         return view('tickets.index')->withTickets($tickets);
     }
 }
开发者ID:omego,项目名称:sts,代码行数:11,代码来源:TicketsController.php

示例4: home

 public function home()
 {
     if (Auth::check()) {
         if (Auth::user()->role === 'admin') {
             $tickets = Ticket::count();
             return view('pages.home')->with('tickets', $tickets);
         } elseif (Auth::user()->role === 'tech') {
             $tickets = Ticket::where('tech_id', '=', Auth::user()->id)->count();
             return view('pages.home')->with('tickets', $tickets);
         }
     } else {
         return view('auth.login');
     }
 }
开发者ID:omego,项目名称:sts,代码行数:14,代码来源:PagesController.php

示例5: ticket

 public function ticket($members)
 {
     $employee = json_decode($members);
     foreach ($employee as $key) {
         $ticket = Ticket::where('assigned_to', $key)->where('ticket_type_id', 28)->where('status_id', 3)->get();
         if (count($ticket)) {
             foreach ($ticket as $key) {
                 $id[] = $key->id;
             }
         } else {
             $id[] = NULL;
         }
     }
     return $id;
 }
开发者ID:testoodoo,项目名称:OoodooSiteUp,代码行数:15,代码来源:EmployeeTeam.php

示例6: get_va

 public function get_va()
 {
     //Pull our users VA data
     $record = User::where('cid', '=', Auth::user()->get()->cid)->first();
     //        //Figure out what the last 4 months are and append -1 for the first day of the month
     //        $month = date('Y-m');
     //        $month .= '-1';
     //        $month1before = date('Y-m', strtotime('-1 month'));
     //        $month1before .= '-1';
     //        $month2before = date('Y-m', strtotime('-2 month'));
     //        $month2before .= '-1';
     //        $month3before = date('Y-m', strtotime('-3 month'));
     //        $month3before .= '-1';
     //        //Convert to unix time stamps to compare with the DB
     //        $month = strtotime($month);
     //        $month1before = strtotime($month1before);
     //        $month2before = strtotime($month2before);
     //        $month3before = strtotime($month3before);
     //
     //        //Now let's store our month names in an array
     //        $clicks = array();
     //        $clicks['month_name'] = date("F", $month);
     //        $clicks['month1before_name'] = date("F", $month1before);
     //        $clicks['month2before_name'] = date("F", $month2before);
     //        $clicks['month3before_name'] = date("F", $month3before);
     //
     //
     //        //Count the data in the DB
     //        //Where data is greater than the first of this month and is associated with our logged in user.
     //        $month = Click::where('created_at', '>=', $month)->where('vid', '=', Auth::user()->get()->cid)->count();
     //        //Where data is greater than the first of last month, but less than the first of this month and is associated with our logged in user.
     //        $month1before = Click::where('created_at', '>=', $month1before)->where('created_at', '<', $month)->where('vid', '=', Auth::user()->get()->cid)->count();
     //        //You get the point :)
     //        $month2before = Click::where('created_at', '>=', $month2before)->where('created_at', '<', $month1before)->where('vid', '=', Auth::user()->get()->cid)->count();
     //        $month3before = Click::where('created_at', '>=', $month3before)->where('created_at', '<', $month2before)->where('vid', '=', Auth::user()->get()->cid)->count();
     //        //Add to our clicks array.
     //        $clicks['month'] = $month;
     //        $clicks['month1before'] = $month1before;
     //        $clicks['month2before'] = $month2before;
     //        $clicks['month3before'] = $month3before;
     //Let's just keep it simple for now and get the total number of clicks
     $clicks = Click::where('vid', '=', Auth::user()->get()->cid)->count();
     //Pull our ticket information
     $opentickets = Ticket::where('vid', '=', Auth::user()->get()->cid)->where('status', '=', '1')->orderBy('created_at', 'DESC')->get();
     $openticketscount = count($opentickets);
     $closedtickets = Ticket::where('vid', '=', Auth::user()->get()->cid)->where('status', '=', '0')->orderBy('created_at', 'DESC')->get();
     $closedticketscount = count($closedtickets);
     //Create our array
     $tickets = array();
     $tickets['opentickets'] = $opentickets;
     $tickets['opentickets_count'] = $openticketscount;
     $tickets['closedtickets'] = $closedtickets;
     $tickets['closedtickets_count'] = $closedticketscount;
     //Pull our replies
     $tickets_request = Ticket::where('vid', '=', Auth::user()->get()->cid)->get();
     $tids = array();
     foreach ($tickets_request as $ticket_request) {
         $tid = $ticket_request->id;
         $tids[$tid] = $tid;
     }
     if (!empty($tids)) {
         $replies = TicketReply::whereIn('tid', $tids)->orderBy('created_at', 'ASC')->get();
     } else {
         $replies = '';
     }
     $tickets['replies'] = $replies;
     //Pull our Category data
     $categories = Category::where('hidden', '!=', 1)->get();
     //Check to see if there is a banner if so provide the source for it
     if ($record->banner) {
         $banner = User::getBannerUrl(Auth::user()->get()->cid);
     } else {
         //No banner we will set this as false so the views no not to try and display it.
         $banner = FALSE;
     }
     //Get our news
     $news = News::orderBy("updated_at", "DESC")->get();
     //Create our view with the VA, clicks, categories and tickets data.
     return View::make('va')->with(array('news' => $news, 'record' => $record, 'clicks' => $clicks, 'tickets' => $tickets, 'categories' => $categories, 'banner' => $banner));
 }
开发者ID:A-Lawrence,项目名称:VASOPS,代码行数:80,代码来源:VaController.php

示例7: link_to_route

					<td>{{{ $seance->count }}}</td>
					<td>{{{ $seance->datetime }}}</td>
                    <td>{{ link_to_route('seances.edit', 'Edit', array($seance->id), array('class' => 'btn btn-info')) }}</td>
                    <td>
                        {{ Form::open(array('method' => 'DELETE', 'route' => array('seances.destroy', $seance->id))) }}
                            {{ Form::submit('Delete', array('class' => 'btn btn-danger')) }}
                        {{ Form::close() }}
                    </td>
		</tr>
	</tbody>
</table>

<h4>Available Tickets</h4>
<?php 
$tickets = $seance->tickets();
$tickets = Ticket::where('seance_id', '=', $seance->id)->get();
?>
@if ($tickets->count())
	<table class="table table-striped table-bordered">
		<thead>
			<tr>
				<th>Price</th>
				<th>Seance</th>
				<th>Row</th>
				<th>Place</th>
				<th>Status</th>
				<th>User</th>
			</tr>
		</thead>

		<tbody>
开发者ID:Atiragram,项目名称:poit-labs,代码行数:31,代码来源:show.blade.php

示例8: post_guestreopenticket

 public function post_guestreopenticket()
 {
     //Get our data
     $ticketid = Input::get('ticketid');
     $hash = Input::get('hash');
     //Fetch our ticket
     $ticket = Ticket::where('id', '=', $ticketid)->where('hash', '=', $hash)->first();
     if (!empty($ticket)) {
         //Reopen our ticket
         $ticket->status = 1;
         //Update our ticket
         $ticket->save();
         //Hell, let's just pull new replies in case something was updated
         $status = '<span style="margin-right: 10px;" class="badge badge-success">OPEN</span>';
         $response = '<div id="ticketreceived" data-tickethash="' . $ticket->hash . '" data-ticketid="' . $ticket->id . '" class="well"><div style="margin-top: 20px; margin-bottom: 40px;" class="row-fluid"><div style="border-bottom: 1px solid #e5e5e5;" class="span10 offset2"><h4>' . $status . ' ' . $ticket->subject . '</h4></div><div class="span2"><strong>' . $ticket->name . '</strong><br /><small>' . $ticket->created_at . '</small></div><div style="padding-top: 3px; padding-left: 3px; margin-left: 0px; border-left: 1px solid #e5e5e5;" class="span8">' . $ticket->description . '</div></div></div>';
         //Get our replies
         $replies = $ticket->replies()->get();
         foreach ($replies as $reply) {
             //Figure out if this is a staff reply
             if ($reply->staff == 0) {
                 $author = '<strong>' . $ticket->name . '</strong>';
             } else {
                 //Alright. It is a staff reply. Let's fetch the name of the auditor
                 $author = '<span class="label label-important"><i class="fa fa-bookmark fa-fw"></i>' . ConsoleUser::getName($reply->author) . '</span>';
             }
             $response .= '<div style="margin-top: 15px; margin-bottom: 15px;"><hr style="border-bottom: 0;" /></div><div class="well"><div style="margin-top: 20px; margin-bottom: 40px;" class="row-fluid"><div class="span2">' . $author . '<br /><small>' . $reply->created_at . '</small></div><div style="padding-top: 3px; padding-left: 3px; margin-left: 0px; border-left: 1px solid #e5e5e5;" class="span8">' . $reply->content . '</div></div></div>';
         }
         echo $response;
     }
 }
开发者ID:A-Lawrence,项目名称:VASOPS,代码行数:30,代码来源:AjaxController.php

示例9: get_index

 public function get_index()
 {
     return View::make('page.user.support.index')->with('tickets', Ticket::where('user_id', '=', Auth::user()->id)->order_by('created_at', 'DESC')->get());
 }
开发者ID:albertpaulp,项目名称:PrettyBoot,代码行数:4,代码来源:support.php

示例10: getInProgressTicketsByUser

 public function getInProgressTicketsByUser()
 {
     return Ticket::where('status_id', '=', '2')->where('owner_id', '=', Sentry::getUser()->id)->get();
 }
开发者ID:terrygl,项目名称:SimpleLance,代码行数:4,代码来源:Ticket.php

示例11: get_solved

 public function get_solved()
 {
     return View::make('page.admin.support.overview')->with('tickets', Ticket::where('solved', '=', 1)->order_by('created_at', 'DESC')->paginate(100));
 }
开发者ID:albertpaulp,项目名称:PrettyBoot,代码行数:4,代码来源:support.php

示例12: show

 public function show($id)
 {
     $users = UserAction::findOrFail($id);
     $tickets_count = Ticket::where('tech_id', '=', $id)->count();
     return View('users.show')->with('users', $users)->with('tickets_count', $tickets_count);
 }
开发者ID:omego,项目名称:sts,代码行数:6,代码来源:UsersController.php

示例13: get_helpdesk

 public function get_helpdesk($filter)
 {
     $filter = strtolower($filter);
     //Make sure our filter is valid
     if ($filter != "open" && $filter != "closed" && $filter != "assigned") {
         //Shit, that's bad. Throw a 404.
         App::abort(404, 'Invalid helpdesk filter');
     }
     //Create our subheader based on the URL parameter and fetch the relevant list of tickets
     switch ($filter) {
         case 'open':
             $subheader = "Open Tickets";
             $tickets = Ticket::where('status', '=', '1')->orderBy('updated_at', 'DESC')->get();
             break;
         case 'closed':
             $subheader = "Closed Tickets";
             $tickets = Ticket::where('status', '=', '0')->orderBy('updated_at', 'DESC')->get();
             break;
         case 'assigned':
             $subheader = "Assigned Tickets";
             $tickets = Ticket::where('assigned', '=', Auth::consoleuser()->get()->cid)->where('status', '=', '1')->orderBy('updated_at', 'DESC')->get();
             break;
     }
     //Get the replies
     $repliescount = array();
     foreach ($tickets as $ticket) {
         $repliescount[$ticket->id] = Ticket::find($ticket->id)->replies()->count();
     }
     return View::make('console.helpdesk')->with(array('subheader' => $subheader, 'tickets' => $tickets, 'repliescount' => $repliescount));
 }
开发者ID:A-Lawrence,项目名称:VASOPS,代码行数:30,代码来源:ConsoleController.php

示例14: postDelete

 /**
  * Remove the specified Ticket .
  *
  * @param $ticket
  *
  */
 public function postDelete($ticket)
 {
     //Only admin to delete the ticket
     Ticket::where('id', $ticket->id)->where('user_id', Auth::id())->delete();
     $id = $ticket->id;
     $ticket->delete();
     // Was the comment post deleted?
     $ticket = Ticket::where('user_id', Auth::id())->find($id);
     if (empty($ticket)) {
         // TODO needs to delete all of that user's content
         return Redirect::to('ticket')->with('success', 'Removed Ticket Successfully');
     } else {
         // There was a problem deleting the user
         return Redirect::to('ticket/' . $ticket->id . '/edit')->with('error', 'Error while deleting ticket');
     }
 }
开发者ID:XDocker,项目名称:app,代码行数:22,代码来源:TicketController.php


注:本文中的Ticket::where方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。