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