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