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