PHP code example of scaffold-digital / laravel-recaptcha

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

    

scaffold-digital / laravel-recaptcha example snippets



return [
    'key' => 'YOUR SITE KEY',
    'secret' => 'YOUR SECRET KEY',
];

$validator = Validator::make($request->all(), [
    'g-recaptcha-response' => 'recaptcha'
]);

$valid = Recaptcha::verify($request->input('g-recaptcha-response'));

php artisan vendor:publish
Blade
<head>
...
{!! Recaptcha::getScript(); !!}
</head>