/** * Show the form for creating a new resource. * * @return \Illuminate\Http\Response */ public function create() { $tickets = Ticket::whereStatus(3)->lists('slug', 'id')->all(); //$comments = Comment::whereId(11)->lists('content', 'id')->all(); //var_dump($comments); return view('tickets.create', compact('tickets')); }
/** * Returns all the Tickets whether they are open/close * * @param $status * @return View */ public function tickets_by_status($status) { $tickets = $this->ticket->whereStatus($status)->orderBy('id', 'asc')->paginate(10); $header = 'Tickets that are ' . $status; return view('tickets.index', compact('tickets', 'header')); }