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