Skip to content

alex-oliveira/ao-recaptcha

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ao-ReCaptcha

Using Google ReCaptcha with Laravel 5.1

1) Installation

Run

$ composer require alex-oliveira/ao-recaptcha

Add in your ".env"

RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET_KEY=

Add in your "config/app.php"

'providers' => [
    /*
     * Vendors Service Providers...
     */
    AoReCaptcha\ServiceProvider::class,
]

Run

$ php artisan vendor:publish

2) Using

Add before </head>

{!! recaptcha()->script() !!}

Add between <form> and </form>

{!! recaptcha()->input() !!}

Add in your controller

try {
    recaptcha()->check(request()->get('g-recaptcha-response'));
} catch (\Exception $e) {
    
}

About

Using Google ReCaptcha with Laravel 5.1

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages