Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Filament Turnstile

Filament Turnstile Laravel Package

coderflex/filament-turnstile

View on GitHub
Deep Wiki
Context7

Filament Plugin to help you implement Cloudflare Turnstile

Frequently asked questions about Filament Turnstile
How do I install Filament Turnstile for Laravel?
Run `composer require coderflex/filament-turnstile` and specify the correct version for your Filament (e.g., `^4.0` for v5, `^3.0` for v4). Add your Cloudflare `TURNSTILE_SITE_KEY` and `TURNSTILE_SECRET_KEY` to `.env`. No additional config is needed for basic usage.
Does this package work with Filament v3 or v4?
Yes, it supports Filament v2 through v5. Use version `^1.0` for v2, `^2.0` for v3, `^3.0` for v4, and `^4.0` for v5. Check the [README](https://github.com/coderflexx/filament-turnstile) for version-specific installation commands.
Will this break my existing Filament forms?
No, the package integrates as a standalone form component. Add it to your forms via `Turnstile::make('captcha')`—it won’t interfere with existing fields or workflows. Test on a staging environment first for critical forms.
How does server-side validation work?
The package relies on `laravel-turnstile` for backend validation, which verifies Cloudflare’s response tokens. Failed validations trigger Filament’s built-in error handling. Ensure your `.env` has the correct `TURNSTILE_SECRET_KEY` for secure validation.
Can I customize the Turnstile theme or language?
Yes, you can pass options like `theme: 'light'` or `language: 'es'` when initializing the component. For dynamic settings (e.g., per user locale), use Filament’s form modifiers or JavaScript to update the Turnstile instance before submission.
What’s the impact on page load performance?
The package lazy-loads Turnstile’s JavaScript/CSS to avoid blocking initial render. Benchmark your forms with/without it—most users report minimal impact, especially on forms where CAPTCHA isn’t always visible (e.g., conditional fields).
How do I handle failed CAPTCHA submissions?
Filament automatically displays validation errors if Turnstile’s response fails. For custom messages, override the error handling in your form’s `rules()` or use Filament’s `afterStateUpdated` to reset the CAPTCHA challenge dynamically.
Is there support for Turnstile’s enterprise features?
Currently, the package focuses on core Turnstile functionality. For enterprise features (e.g., custom branding), check Cloudflare’s [Turnstile API docs](https://developers.cloudflare.com/turnstile/) and extend the package via JavaScript or server-side hooks in `laravel-turnstile`.
Can I use this with Filament’s login or registration forms?
Absolutely. Replace the default CAPTCHA in Filament’s auth forms by registering the `Turnstile` component in your `AppServiceProvider` or form definition. Example: `use Turnstile::make('captcha')->rules(['required', 'turnstile'])` in your login form.
What alternatives exist if I don’t want Cloudflare Turnstile?
For Filament, consider `spatie/laravel-honeypot` (for honeypot traps) or `filament/forms` extensions for reCAPTCHA. However, Turnstile offers better privacy and lower JavaScript overhead. If you need reCAPTCHA, use `laravel-recaptcha` with Filament’s custom components.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky