Downloads
Stars
Version
composer require albertgpdev/invisible_captcha --dev
Add ServiceProvider to the providers array in app/config/app.php
.
Albertgpdev\InvisibleCaptcha\InvisibleCaptchaServiceProvider::class,
It also supports package discovery for Laravel 5.5.
Add INVISIBLE_RECAPTCHA_PUBLIC_KEY
, INVISIBLE_RECAPTCHA_PRIVATE_KEY
to .env file.
// required
INVISIBLE_RECAPTCHA_PUBLIC_KEY=your_public_key
INVISIBLE_RECAPTCHA_PRIVATE_KEY=your_private_key
Before you render the captcha, please keep those notices in mind:
getCaptcha()
function needs to be called within a form element.type
attribute of your submit button has to be submit
.{!! app('captcha')->getCaptcha(); !!}
With custom language support:
{!! app('captcha')->getCaptcha('en'); !!}
With custom position:
{!! app('captcha')->getCaptcha('inline'); !!}
{!! app('captcha')->getCaptcha('bottomright'); !!}
{!! app('captcha')->getCaptcha('bottomleft'); !!}
Add 'g-recaptcha-response' => 'required|captcha'
to rules array.