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