/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $ticket = Ticket::with('organization', 'privateMessages.user', 'publicMessages', 'publicMessages.files', 'publicMessagesContacts', 'publicContacts', 'users')->findOrFail($id); return view('tickets.show', compact('ticket')); }
/** * Display the specified resource. * * @param int $id * @param string $slug * @return Response */ public function show($id, $slug) { $ticket = Ticket::with('organization', 'publicMessages.files')->whereId($id)->whereSlug($slug)->firstOrFail(); return view('frontend.tickets.show', compact('ticket')); }
public function find($id) { return Ticket::with('information')->findOrFail($id); }
public function undelivered() { $tickets = Ticket::with('user')->where('entregado', '=', 0)->get(); return response()->json($tickets); }