repository = $sprint; parent::__construct(); } /** * Show sprint's list. * * @param string $slug * * @return response */ protected function index() { $sprints = $this->repository ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria')) ->scopeQuery(function($query){ return $query->orderBy('id','DESC'); })->paginate(); return $this->response->setMetaTitle(trans('pm::sprint.names')) ->view('pm::public.sprint.index') ->data(compact('sprints')) ->output(); } /** * Show sprint. * * @param string $slug * * @return response */ protected function show($slug) { $sprint = $this->repository->scopeQuery(function($query) use ($slug) { return $query->orderBy('id','DESC') ->where('slug', $slug); })->first(['*']); return $this->response->setMetaTitle($sprint->name . trans('pm::sprint.name')) ->view('pm::public.sprint.show') ->data(compact('sprint')) ->output(); } }