teepluss / recaptcha
Google No CAPTCHA reCAPTCHA for Laravel.
0.1
2015-01-14 08:22 UTC
Requires
- php: >=5.4.0
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2024-12-21 18:04:10 UTC
README
Are you a robot? Introducing “No CAPTCHA reCAPTCHA”
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