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