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