LaravelPackages.net
Acme Inc.
Toggle sidebar
eskju/laravel-google-recaptcha

A Laravel package for banning bots from your forms

148
1
1.0.0
About eskju/laravel-google-recaptcha

eskju/laravel-google-recaptcha is a Laravel package for a laravel package for banning bots from your forms. It currently has 1 GitHub stars and 148 downloads on Packagist (latest version 1.0.0). Install it with composer require eskju/laravel-google-recaptcha. Discover more Laravel packages by eskju or browse all Laravel packages to compare alternatives.

Last updated

laravel-google-recaptcha

ReCaptcha for Laravel

Features:

  • easy Google ReCaptcha (v2) integration via Facade
  • simple Validator for your own ruleset

Usage

composer require eskju/laravel-google-recaptcha

Publish config and edit .env

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=

Usage

Add the following snippet to your (form) template:

{{ GoogleRecaptcha::show() }}
{{ GoogleRecaptcha::js() }}

Add a new rule to your validation:

'g-recaptcha-response' => 'required|recaptcha'

Star History Chart