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