2017 © Pedro Peláez
 

library yii2-recaptcha

Yii2 widget for reCaptcha

image

petrabarus/yii2-recaptcha

Yii2 widget for reCaptcha

  • Monday, June 13, 2016
  • by petrabarus
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4,318 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 9 % Grown

The README.md

Yii2 ReCaptcha

Google reCaptcha widget for Yii2., (*1)

Latest Stable Version Total Downloads Latest Unstable Version, (*2)

Installation

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

Either run, (*4)

php composer.phar require --prefer-dist petrabarus/yii2-recaptcha "*"

or add, (*5)

"petrabarus/yii2-recaptcha": "*"

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

Requirement

This package require, (*7)

  • Latest Yii2
  • PHP 5.4 or later

Usage

Obtain the credentials in Google reCaptch. After that dd configuration in the params., (*8)

[
    'reCaptcha' => [
        'siteKey' => 'ABCDEFGHIJKLMN',
        'secretKey' => 'ABCDEFGHIJKLMN',
    ]
]

Make sure the configuration can be accessed via Yii::$app->params['reCaptcha']['siteKey'] and Yii::$app->params['reCaptcha']['secretKey']., (*9)

To use in the active form., (*10)

$form->field($model, 'captcha')->widget(\PetraBarus\Yii2\ReCaptcha\ReCaptcha::class);

To add validator in the rules, (*11)

['captcha', \PetraBarus\Yii2\ReCaptcha\ReCaptchaValidator::class],

The Versions

13/06 2016

dev-master

9999999-dev

Yii2 widget for reCaptcha

  Sources   Download

The Requires

 

by Petra Barus