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