Google's Invisible reCAPTCHA - samuelgrant/fight-for-kidz GitHub Wiki
Google's Invisible reCAPTCHA
This application makes use of the Google Invisible reCaptcha service to help protect the site from being spammed.
Current functions that use Google's Invisible reCAPTCHA:
- Register
- Subscribe
- Apply
Setting up the reCAPTCHA
Offical Documentation | albertcht/invisible-recaptcha - docs
- Login to https://www.google.com/recaptcha/admin#list with your google account.
- Create a new reCAPTCHA service using the websites URL. This service must use the Invisible CAPTCHA.
- Setup the reCAPTCHA section of your .env file so it looks like this:
INVISIBLE_RECAPTCHA_SITEKEY={SITE FROM GOOGLE}
INVISIBLE_RECAPTCHA_SECRETKEY={SECRETKEY FROM GOOGLE}
INVISIBLE_RECAPTCHA_DEBUG=true
Usage
To render the reCAPTCHA use {!! app('captcha')->render(); !!}
.
In the @store method or equivelent use the following validation rule 'g-recaptcha-response' => 'required|captcha'
.
Full example:
$validate = Validator::make(Input::all(), [
'g-recaptcha-response' => 'required|captcha'
]);