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