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