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