search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = Feature::pushScope(new RequestScope()) ->pushScope(new FeaturePublicScope()) ->paginate($pageLimit) ->withQueryString(); $features = new FeaturesCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('feature::feature.names')) ->view('feature::public.feature.index') ->data(compact('features', 'categories', 'tags', 'recent')) ->output(); } /** * Show feature. * * @param string $slug * * @return response */ protected function show(PublicRequest $request, $slug) { $model = Feature::findBySlug($slug); $data = new FeatureResource($model); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle($data['title'] . trans('feature::feature.name')) ->view('feature::public.feature.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }