get('captcha_key', ''); $captcha = $request->get('captcha', ''); if (!app(CaptchaService::class)->check($captcha, $captchaKey)) { throw new NotAllowedException('验证码不正确'); } return $next($request); } }