LaravelPackages.net
Acme Inc.
Toggle sidebar
albertgpdev/invisible_captcha

Invisible Google ReCaptcha provided by Google

32
2
About albertgpdev/invisible_captcha

albertgpdev/invisible_captcha is a Laravel package for invisible google recaptcha provided by google. It currently has 2 GitHub stars and 32 downloads on Packagist. Install it with composer require albertgpdev/invisible_captcha. Discover more Laravel packages by albertgpdev or browse all Laravel packages to compare alternatives.

Last updated

Invisible CAPTCHA

Installation

composer require albertgpdev/invisible_captcha --dev

Laravel 5

Setup

Add ServiceProvider to the providers array in app/config/app.php.

Albertgpdev\InvisibleCaptcha\InvisibleCaptchaServiceProvider::class,

It also supports package discovery for Laravel 5.5.

Configuration

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

Usage

Before you render the captcha, please keep those notices in mind:

  • getCaptcha() function needs to be called within a form element.
  • You have to ensure the type attribute of your submit button has to be submit.
  • There can only be one submit button in your form.
Display reCAPTCHA in Your View
{!! 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'); !!}
Validation

Add 'g-recaptcha-response' => 'required|captcha' to rules array.

Star History Chart