Package Data | |
---|---|
Maintainer Username: | tenowg |
Maintainer Contact: | tenowg@gmail.com (tenowg) |
Package Create Date: | 2014-05-14 |
Package Last Update: | 2014-06-16 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-04-24 03:03:23 |
Package Statistics | |
---|---|
Total Downloads: | 144 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 2 |
Total Watchers: | 3 |
Total Forks: | 2 |
Total Open Issues: | 0 |
add tenowg/recaptcha
to your requirements in composer.json
"require": {
"tenowg/recaptcha": "1.0.*"
}
Don't forget to composer update
Recaptcha is completely self supporting, other than needing Laravel 4
there are no other requirements.
You will need to create a ReCaptcha Account on Google Recaptcha Once you have your public and private keys generated, you can finish setting up reCaptcha.
php artisan config:publish tenowg/recaptcha
This will export the config file to app/config/packages/tenowg/recaptcha
as config.php
edit this file and enter the required information. (public and private keys)
Thats it, and you are ready to rock... simple.
Using Recaptcha couldn't be easier, just use some of the methods below and you will be all set.
Simply call reCaptcha::display()
where you wish to display the recaptcha form. This should always be in your
form.
{{ Form::open(blah) }}
{{ reCaptcha::display() }}
{{ Form::close() }}
Verifying the recaptcha is "Almost automatic", you can either use validation methods, or filters.
Controller filter in __construct()
$this->beforeFilter('recaptcha', array('only' => array('postForm')));
Using the Validator
$rules = array(
'recaptcha_response_field' => 'required|recaptcha:' . Input::get('recaptcha_challenge_field')
);