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