/** * Returns the Tickets for a given Backlog ID * * @param $id * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function tickets_by_backlog($id) { $tickets = Ticket::where('backlog_id', $id)->latest()->paginate(10); $header = 'Tickets for Backlog ' . Backlog::findOrFail($id)->name; return view('tickets.index', compact('tickets', 'header')); }
/** * Returns the Tickets for a given Backlog id * * @param $id * @return View */ public function tickets_by_backlog($id) { $tickets = $this->ticket->whereBacklogId($id)->orderBy('id', 'asc')->paginate(10); $header = 'Tickets for Backlog ' . Backlog::findOrFail($id)->name; return view('tickets.index', compact('tickets', 'header')); }