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