input(); $user = auth('api')->user(); $user->password = bcrypt($input['new_password']); $user->save(); $user->tokens()->delete(); return $this->success('修改成功'); } public function logout() { $user = auth('api')->user(); $user->tokens()->delete(); return $this->success('退出成功'); } }