search; $pageLimit = $request->input('pageLimit', config('database.pagination.limit')); $page = Profile::pushScope(new RequestScope()) ->pushScope(new ProfilePublicScope()) ->select('profiles.*') ->paginate($pageLimit) ->withQueryString(); $data = new ProfilesCollection($page); $categories = []; $tags = []; $recent = []; return $this->response->setMetaTitle(trans('profile::profile.names')) ->view('profile::public.profile.index') ->data(compact('data', '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(); } }