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('contact::contact.names')) ->view('contact::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('contact::contact.name')) ->view('contact::public.contact.show') ->data(compact('data', 'categories', 'tags', 'recent')) ->output(); } }