PHP code example of torralbodavid / simple-recaptcha-v3

1. Go to this page and download the library: Download torralbodavid/simple-recaptcha-v3 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/ */

    

torralbodavid / simple-recaptcha-v3 example snippets


    'recaptcha_response' => new Captcha

    use Torralbodavid\SimpleRecaptchaV3\Rules\Captcha;
    
    ...
    
    $request->validate([
        ...
        'recaptcha_response' => new Captcha,
    ]);

config()->set('simple-recaptcha-v3.active', false);
bash
php artisan vendor:publish --provider="Torralbodavid\SimpleRecaptchaV3\SimpleRecaptchaV3ServiceProvider" --tag=config
html
    <form method="..." action="...">
        @captcha('login')
        ...
    </form>
bash
php artisan vendor:publish --provider="Torralbodavid\SimpleRecaptchaV3\SimpleRecaptchaV3ServiceProvider" --tag=lang
bash
php artisan vendor:publish --provider="Torralbodavid\SimpleRecaptchaV3\SimpleRecaptchaV3ServiceProvider" --tag=views