info()->update([$field => $request->value]); return $this->success(); } public function search(Request $request): JsonResponse { $keyword = $request->keyword; $list = User::where('username', 'like', "%$keyword%") ->whereHas('setting', function ($query) { $query->where('privacy', 1); }) ->limit(3) ->get(); return $this->success(new UserSearchCollection($list)); } /** * Notes : 设置隐私状态 * * @Date : 2022/11/1 10:26 * @Author : */ public function privacy(): JsonResponse { $user = Api::user(); $user->privacy = ! $user->privacy; $user->save(); return $this->success($user->privacy); } public function download(): JsonResponse { return $this->success('https://www.uzchain.tech?invite='.Api::user()->username); } public function email() { } public function mobile() { } }