PHP code example of muazzambuilds / filament-turnstile
1. Go to this page and download the library: Download muazzambuilds/filament-turnstile library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
muazzambuilds / filament-turnstile example snippets
use MuazzamBuilds\FilamentTurnstile\TurnstilePlugin;
public function panel(Panel $panel): Panel
{
return $panel
->login()
->registration()
->passwordReset()
->plugin(
TurnstilePlugin::make()
->protectRegistration() // opt-in
->protectPasswordReset() // opt-in (request page only)
);
}
TurnstilePlugin::make()
->theme('auto') // auto | light | dark
->size('flexible') // normal | flexible | compact
->language('en-US')
->enabled(true);
use MuazzamBuilds\FilamentTurnstile\Forms\Components\Turnstile;
Turnstile::make('cf-turnstile-response')
->theme('dark')
->size('compact')
->turnstileAction('contact');