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