PHP code example of crazyinventor / laravel5-recaptcha2

1. Go to this page and download the library: Download crazyinventor/laravel5-recaptcha2 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/ */

    

crazyinventor / laravel5-recaptcha2 example snippets


$rules = [
    // ...
    'g-recaptcha-response' => '

// prevent validation error on captcha
Recaptcha::shouldReceive('verify')
    ->once()
    ->andReturn(true);
// provide hidden input for your '

$app = $this->app;
    $app['validator']->extend('recaptcha', function ($attribute, $value) use ($app) {
    return true;
});

'Recaptcha' => 'CrazyInventor\Lacaptcha\Facades\Lacaptcha',

php artisan vendor:publish