dutchcodingcompany/livewire-recaptcha
.env keys for reCAPTCHA secrets). No database migrations or complex setup.@recaptcha directive, enabling granular protection (e.g., apply only to form submissions).mollie/laravel-recaptcha) lack Livewire integration.composer require dutchcodingcompany/livewire-recaptcha
Add .env keys:
RECAPTCHA_SITE_KEY=your_site_key
RECAPTCHA_SECRET_KEY=your_secret_key
php artisan vendor:publish --provider="DutchCodingCompany\LivewireRecaptcha\LivewireRecaptchaServiceProvider"
Customize in config/livewire-recaptcha.php (e.g., default version, score thresholds).public function submitForm() {
$this->validate([
'field' => 'required',
]);
// reCAPTCHA validation handled automatically
}
<button wire:click="submitForm" @recaptcha>Submit</button>
6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI).composer update dutchcodingcompany/livewire-recaptcha).recaptcha_failed events) to debug issues..env keys in secure vaults (e.g., Laravel Forge, AWS Secrets Manager)..env keys → Check php artisan config:clear.@stack and @scripts are included.min_score in config (v3).wire:ignore for isolating components.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Google reCAPTCHA API downtime | Form submissions blocked | Implement queue-based retries or fallback to manual review. |
Invalid .env keys |
Silent failures | Add validation in AppServiceProvider. |
| High false-positive rate (v3) | User frustration | Adjust min_score or use v2 for critical forms. |
| Livewire directive JS errors | Component breaks | Wrap in @error handlers or use wire:ignore. |
| Rate limiting (Google API) | Throttled requests | Implement exponential backoff in retries. |
@recaptcha lifecycle.@recaptcha only on submit").How can I help you explore Laravel packages today?