info('CAPTCHA Configuration Status'); $this->info('================================'); $this->newLine(); $provider = config('captcha.provider', 'recaptcha'); $this->line("Active Provider: {$provider}"); $this->newLine(); // Check reCAPTCHA $this->info('Google reCAPTCHA:'); $recaptchaEnabled = config('captcha.recaptcha.enabled'); $recaptchaSitekey = config('captcha.recaptcha.sitekey'); $recaptchaSecret = config('captcha.recaptcha.secret'); $this->line(' Enabled: '.($recaptchaEnabled ? 'Yes' : 'No')); $this->line(' Site Key: '.(! empty($recaptchaSitekey) ? 'Configured' : 'Missing')); $this->line(' Secret: '.(! empty($recaptchaSecret) ? 'Configured' : 'Missing')); $this->newLine(); // Check Turnstile $this->info('Cloudflare Turnstile:'); $turnstileEnabled = config('captcha.turnstile.enabled'); $turnstileSitekey = config('captcha.turnstile.sitekey'); $turnstileSecret = config('captcha.turnstile.secret'); $this->line(' Enabled: '.($turnstileEnabled ? 'Yes' : 'No')); $this->line(' Site Key: '.(! empty($turnstileSitekey) ? 'Configured' : 'Missing')); $this->line(' Secret: '.(! empty($turnstileSecret) ? 'Configured' : 'Missing')); $this->newLine(); // Validation $recaptchaReady = $recaptchaEnabled && ! empty($recaptchaSitekey) && ! empty($recaptchaSecret); $turnstileReady = $turnstileEnabled && ! empty($turnstileSitekey) && ! empty($turnstileSecret); if ($recaptchaReady && $turnstileReady) { $this->error('⚠ WARNING: Both providers are enabled!'); $this->warn('Only one CAPTCHA provider should be enabled at a time.'); $this->warn("The system will use: {$provider}"); $this->newLine(); } if ($provider === 'recaptcha' && $recaptchaReady) { $this->info('✓ reCAPTCHA is properly configured and active'); } elseif ($provider === 'turnstile' && $turnstileReady) { $this->info('✓ Turnstile is properly configured and active'); } elseif ($provider === 'recaptcha' && ! $recaptchaReady) { $this->error('✗ reCAPTCHA is selected but not properly configured'); } elseif ($provider === 'turnstile' && ! $turnstileReady) { $this->error('✗ Turnstile is selected but not properly configured'); } else { $this->warn('⚠ No CAPTCHA provider is active'); } $this->newLine(); $this->comment('To change providers, update CAPTCHA_PROVIDER in your .env file'); $this->comment('Then run: php artisan config:clear'); return Command::SUCCESS; } }