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