granitibrahimi/google-recaptcha-laravel

This package is abandoned and no longer maintained. No replacement package was suggested.

Google reCAPTCHA For Laravel.

Installs: 106

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Open Issues: 0

pkg:composer/granitibrahimi/google-recaptcha-laravel

dev-master 2015-07-15 13:58 UTC

This package is not auto-updated.

Last update: 2015-11-29 01:42:49 UTC


README

Google reCaptcha for Laravel5

68747470733a2f2f7777772e676f6f676c652e63

Installation

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

{
    "require": {
        "granitibrahimi/google-recaptcha-laravel": "1.1.*@dev"
    }
}

Laravel 5 Setup

*. In /config/app.php, add the following to providers:

  Gibrahimi\ReCaptcha\ServiceProvider,

and the following to aliases:

  'ReCaptcha' => 'Gibrahimi\ReCaptcha\Facade',

. add RECAPTCHA_SECRET_KEY and RECAPTCHA_SITE_KEY in *.env** file:

  RECAPTCHA_SECRET_KEY=[secret-key]
  RECAPTCHA_SITE_KEY=[site-key]

OR

*. Run php artisan vendor:publish. In /config/recaptcha.php, enter your reCAPTCHA public and private keys

  return [
    'site_key' => 'site-key'
    'secret_key' => 'secret-key'
  ];

Usage

Display reCAPTCHA
{!! ReCaptcha::display(); !!}
{!! $errors->first('g-recaptcha-response', '<span class="error">:message</span>') !!}
Validation

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