PHP code example of justijndepover / laravel-google-recaptcha-v2

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

    

justijndepover / laravel-google-recaptcha-v2 example snippets


return [

    /*
     * Your Google Recaptcha key
     */
    'key' => env('GOOGLE_RECAPTCHA_KEY'),

    /*
     * Your Google Recaptcha secret
     */
    'secret' => env('GOOGLE_RECAPTCHA_SECRET'),

    /*
     * Skip recaptcha validation in local development
     */
    'skip_in_local_development' => true,

];

$request->validate([
    'g-recaptcha-response' => ['recaptcha'],
])

php artisan vendor:publish --tag="laravel-google-recaptcha-v2-config"