*/ public function send() { $user = Api::user(); try { Sms::sendVerificationCode($user->getMobile(), 'G2FA'); return $this->success('验证码发送成功'); } catch (InvalidArgumentException|NoGatewayAvailableException $e) { return $this->failed($e->getMessage()); } } }