/** * Display a list of all of the user's tickets. * * @param Project $project * @return Response */ public function scrum(Project $project) { $tickets = $this->tickets->byProject($project); $statuses = Status::all(); $data = array(); $i = 0; foreach ($statuses as $status) { $data[] = array('status' => $status, 'tickets' => array()); foreach ($tickets as $ticket) { if ($ticket->status->id == $status->id) { array_push($data[$i]['tickets'], $ticket); } } $i++; } // dd($data); return view('scrum.board', ['scrum_data' => $data, 'project' => $project]); }
/** * Display a project. * * @param Request $request * @return Response */ public function view(Request $request) { return view('tickets.index', ['tickets' => $this->tickets->byProject($request->project())]); }
/** * Display a list of all of the user's tickets. * * @param Project $project * @return Response */ public function index(Project $project) { $tickets = $this->tickets->byProject($project); return view('scrum.index', ['tickets' => $tickets, 'project' => $project]); }
/** * Display a list of all of the user's tickets. * * @return Response */ public function myTickets() { $user = Auth::user(); $tickets = $this->tickets->forUser($user); return view('tickets.my', ['tickets' => $tickets]); }
/** * Display a list of all of the user's tickets. * * @param Request $request * @return Response */ public function myTickets(Request $request) { $user = $request->user(); $tickets = $this->tickets->forUser($user); return view('tickets.my', ['tickets' => $tickets]); }