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