PHP code example of blissjaspis / laravel-recaptcha

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

    

blissjaspis / laravel-recaptcha example snippets


return [
    //...
    'recaptcha' => 'The reCAPTCHA validation failed. Please try again.',
];

    $validator = Validator::make(request()->all(), [
        'g-recaptcha-response' => 'recaptcha',
        // OR
        recaptchaFieldName() => recaptchaRuleName()
    ]);
    
sh
php artisan vendor:publish --provider="BlissJaspis\ReCaptcha\ReCaptchaServiceProvider"
blade
    <form id="{{ getFormId() }}">
      @csrf
      ...
      {!! htmlFormButton('Submit', ['class' => 'btn btn-primary']) !!}
    </form>