PHP code example of rmobis / recaptcha-laravel

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

    

rmobis / recaptcha-laravel example snippets


// Providers
'Rmobis\Recaptcha\RecaptchaServiceProvider'

// Aliases
'Recaptcha' => 'Rmobis\Recaptcha\Facade',

$challenge = Input::get('recaptcha_challenge_field');
$response = Input::get('recaptcha_response_field');

if (Recaptcha::check($challenge, $response)) {
    // reCAPTCHA verified
} else {
    // reCAPTCHA failed
}

$validator = Validator::make(array(
	'recaptcha_response_field' => Input::all(),
	// ...
), array(
	'recaptcha_response_field' => 'recaptcha',
	// ...
));

if ($validator->passes()) {
	// reCAPTCHA verified
} else {
	// reCAPTCHA failed
}

Form::recaptcha(array('theme' => 'clean'))
`
php artisan config:publish rmobis/recaptcha-laravel