Skip to content

Laravel reCaptcha Middleware it's a Composer package created to help us to validate reCaptcha payloads during the initial steps of request lifecycle.

License

Notifications You must be signed in to change notification settings

henriqueramos/laravel-recaptcha-middleware

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-recaptcha-middleware

=========

Laravel reCaptcha Middleware it's a Composer package created to help us to validate reCaptcha payloads during the initial steps of request lifecycle.

Installation

Add the following line to the require section of composer.json:

{
    "require": {
        "henriqueramos/recaptcha_middleware": "dev-master"
    }
}

Setup

  1. Run php artisan vendor:publish --provider="RamosHenrique\reCaptchaMiddleware".
  2. In your .env, enter your reCAPTCHA private key as value for RECAPTCHA_MIDDLEWARE_SECRET_KEY and RECAPTCHA_MIDDLEWARE_RESPONSE_TYPE as json or html.

Usage

Add into your selected routes the middleware recaptcha_middleware.

$this->router->post(
    'myProtectedRoute',
    [
        'as' => 'my.protected.route',
        'uses' => 'ProtectedRouteController@necessaryMethod',
    ]
)
->middleware('recaptcha_middleware');

About

Laravel reCaptcha Middleware it's a Composer package created to help us to validate reCaptcha payloads during the initial steps of request lifecycle.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages