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