2017 © Pedro Peláez
 

yii2-extension yii2-recaptcha

Yii2 Google reCaptcha implementation

image

tonyaxo/yii2-recaptcha

Yii2 Google reCaptcha implementation

  • Tuesday, September 13, 2016
  • by tonyaxo
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1,000 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Yii2 Google reCaptcha

Yii2 Google reCAPTCHA version 2.0 implementation., (*1)

Total Downloads, (*2)

Overview

ReCaptcha API version 2.0 docs., (*3)

Features

  • All reCAPTCHA API 2.0 features;
  • Multiple support;
  • Ajax (Pjax) support;
  • jQuery not require;

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

php composer.phar require --prefer-dist tonyaxo/yii2-recaptcha "~1.0"

or add, (*6)

"tonyaxo/yii2-recaptcha": "*"

to the require section of your composer.json file., (*7)

Usage

Once the extension is installed, simply use it in your code by :, (*8)

'components' => [
    'recaptcha' => [
        'class' => 'recaptcha\ReCaptchaComponent',
        'siteKey' => 'site_key',
        'secretKey' => 'key_secret',
    ],
];

You can also use this widget in an [[yii\widgets\ActiveForm|ActiveForm]] using the [[yii\widgets\ActiveField::widget()|widget()]] method, for example like this:, (*9)

<?= $form->field($model, 'reCaptcha')->widget(ReCaptcha::class, [
    'id' => 'sign-up-captcha',
    'render' => ReCaptcha::RENDER_EXPLICIT,
])->label(false) ?>

The Versions

13/09 2016

dev-master

9999999-dev

Yii2 Google reCaptcha implementation

  Sources   Download

MIT

The Requires

 

by Sergey Bogatyrev

extension yii2 widget recaptcha