Download the PHP package ryangjchandler/laravel-cloudflare-turnstile without Composer
On this page you can find all versions of the php package ryangjchandler/laravel-cloudflare-turnstile. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ryangjchandler/laravel-cloudflare-turnstile
More information about ryangjchandler/laravel-cloudflare-turnstile
Files in ryangjchandler/laravel-cloudflare-turnstile
Package laravel-cloudflare-turnstile
Short Description A simple package to help integrate Cloudflare Turnstile.
License MIT
Homepage https://github.com/ryangjchandler/laravel-cloudflare-turnstile
Informations about the package laravel-cloudflare-turnstile
A simple package to help integrate Cloudflare Turnstile.
This packages provides helper for setting up and validating Cloudflare Turnstile CAPTCHA responses.
Installation
You can install the package via Composer:
You should then add the following configuration values to your config/services.php
file:
Visit Cloudflare to create your site key and secret key and add them to your .env
file.
Usage
In your layout file, include the Turnstile scripts using the @turnstileScripts
Blade directive. This should be added to the <head>
of your document.
Once that's done, you can use the <x-turnstile />
component inside of a <form>
to output the appropriate markup with your site key configured.
On the server, use the provided validation rule to validate the CAPTCHA response.
If you prefer to not use a macro, you can resolve an instance of the rule from the container via dependency injection or the app()
helper.
Customizing the widget
You can customize the widget by passing attributes to the <x-turnstile />
component.
To learn more about these parameters, refer to the offical documentation.
This package can also integrate seamlessly with Livewire. Upon successful validation, the property specified inside of wire:model
will be updated with the Turnstile token.
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Ryan Chandler
- All contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-cloudflare-turnstile with dependencies
spatie/laravel-package-tools Version ^1.13.0
illuminate/contracts Version ^10.0|^11.0