afatmustafa/filamentv3-turnstile
coderflexx/laravel-turnstile package under the hood, ensuring compatibility with Cloudflare’s CAPTCHA solution. This reduces reinvention risk.Turnstile widget), making it easy to add to existing forms (e.g., login, registration, or custom admin forms).SiteKey, SecretKey from Cloudflare) and can be configured via Filament’s config/filament.php or environment variables.coderflexx/laravel-turnstile package, which must be installed as a dependency (composer require coderflexx/laravel-turnstile).composer require afatmustafa/filamentv3-turnstile coderflexx/laravel-turnstile
php artisan vendor:publish --tag="filament-turnstile-config"
SiteKey and SecretKey to .env or config/filament.php.'turnstile' => [
'site_key' => env('TURNSTILE_SITE_KEY'),
'secret_key' => env('TURNSTILE_SECRET_KEY'),
],
use Afatmustafa\Filamentv3Turnstile\Widgets\Turnstile;
Turnstile::make('turnstile')
->required()
->rules(['required', 'turnstile']),
LoginForm or use a middleware to inject the widget.turnstile rule (provided by laravel-turnstile).afatmustafa/filamentv3-turnstilecoderflexx/laravel-turnstileSiteKey/SecretKey must be rotated periodically (Cloudflare best practice).TURNSTILE_DEBUG in .env to log API responses.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Cloudflare Turnstile API downtime | Forms fail silently or show errors. | Implement a fallback (e.g., honeypot) or gracefully degrade UX. |
Invalid SiteKey/SecretKey |
CAPTCHA verification fails. | Validate keys during deployment. |
| Filament form submission errors | Widget validation conflicts. | Test with Filament’s validation pipeline. |
| High latency in Turnstile API | Slow form submissions. | Cache the Turnstile script or use a CDN. |
How can I help you explore Laravel packages today?