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