PHP code example of abanoubnassem / filament-grecaptcha-field

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

    

abanoubnassem / filament-grecaptcha-field example snippets


use AbanoubNassem\FilamentGRecaptchaField\Forms\Components\GRecaptcha;

// admin panel
    public static function form(Form $form): Form
    {
        return $form->schema([
                    ...
                    GRecaptcha::make('captcha')
                ]);
     }

//forntend-forms 
    public $captcha = ''; // must be initialized 
    protected function getFormSchema(): array
    {
        return [
            ....
             GRecaptcha::make('captcha')
        ];
    }
bash
php artisan vendor:publish --provider="Anhskohbo\NoCaptcha\NoCaptchaServiceProvider"