user = request()->userInfo; } /** * 获取用户信息 * * @param string $column * @return mixed * @throws \Exception */ protected function getUserInfo(string $column = '') { if (!$this->user) { throw new \Exception('未授权访问,缺少有效的身份凭证', 401); } return $column ? $this->user[$column] : $this->user; } }