teepluss / laravel-recaptcha by teepluss

Google No CAPTCHA reCAPTCHA for Laravel.
115
3
2
Package Data
Maintainer Username: teepluss
Maintainer Contact: teepluss@gmail.com (Teepluss)
Package Create Date: 2014-12-11
Package Last Update: 2016-02-24
Language: PHP
License: MIT
Last Refreshed: 2024-11-08 03:22:44
Package Statistics
Total Downloads: 115
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 3
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel reCAPTCHA.

Are you a robot? Introducing “No CAPTCHA reCAPTCHA”

reCAPTCHA from Google

Installation

To get the lastest version of Recaptcha simply require it in your composer.json file.

"teepluss/recaptcha": "dev-master"

You'll then need to run composer install to download it and have the autoloader updated.

Once reCAPTCHA is installed you need to register the service provider with the application. Open up app/config/app.php and find the providers key.

'providers' => array(
    'Teepluss\Recaptcha\RecaptchaServiceProvider'
)

Publish config using artisan CLI.

php artisan config:publish teepluss/recaptcha

Publish view using artisan CLI.

php artisan view:publish teepluss/recaptcha

Usage

The first you need to config key and secret that get from Google

Display captcha on view

echo Recaptcha::render();

// or

echo Form::recaptcha();

Verify captcha from the server

$v = Validator::make(
    Input::all(),
    array(
        'g-recaptcha-response' => 'required|recaptcha'
    ),
    array(
        'g-recaptcha-response.recaptcha' => 'Please verify that you are not a robot.'
    )
);

if ($v->fails())
{
    var_dump($v->messages());
}

Support or Contact

If you have some problem, Contact teepluss@gmail.com

Support via PayPal