Downloads
Stars
Version
ReCaptcha for Laravel
Features:
composer require eskju/laravel-google-recaptcha
php artisan vendor:publish --provider="Eskju\GoogleRecaptcha\GoogleRecaptchaServiceProvider" --tag="config"
Add Google ReCaptcha credentials to your .env file: (You cam obtain your key here: https://www.google.com/recaptcha/intro/v3.html, select Version 2)
GOOGLE_RECAPTCHA_KEY=
GOOGLE_RECAPTCHA_SECRET=
Add the following snippet to your (form) template:
{{ GoogleRecaptcha::show() }}
{{ GoogleRecaptcha::js() }}
Add a new rule to your validation:
'g-recaptcha-response' => 'required|recaptcha'