PHP code example of marcogermani87 / filament-captcha

1. Go to this page and download the library: Download marcogermani87/filament-captcha 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/ */

    

marcogermani87 / filament-captcha example snippets




use Filament\Support\Enums\ActionSize;

return [

    // optional, default is 5
    // 'length' => 4,

    // optional, default is 'abcdefghijklmnpqrstuvwxyz123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
    // 'charset' => '123456789',

    'width' => 180,

    'height' => 50,

    'background_color' => [255, 255, 255],


    'refresh_button' => [
        'icon' => 'heroicon-o-arrow-path',
        'size' => ActionSize::Medium,
    ],

];

->plugin(\MarcoGermani87\FilamentCaptcha\FilamentCaptcha::make())



use MarcoGermani87\FilamentCookieConsent\Components\CaptchaField;

protected function getForms(): array
{
    return [
        'form' => $this->form(
            $this->makeForm()
                ->schema([
                    ...
                    CaptchaField::make('captcha'),
                ])
                ->statePath('data'),
        ),
    ];
}
bash
php artisan vendor:publish --tag="filament-captcha-config"