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