2017 © Pedro Peláez
 

yii2-extension yii2-captcha

yii2 captcha

image

daimakuai/yii2-captcha

yii2 captcha

  • Saturday, January 27, 2018
  • by daimakuai
  • Repository
  • 0 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

yii2 captcha

yii2 验证码功能,能够处理文字、数字及外文字符集功能。, (*1)

yii2 captcha with Ability to recognize Arabic and Persian numbers., (*2)

screenshot, (*3)

Installation

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

Either run, (*5)

php composer.phar require --prefer-dist daimakuai/yii2-captcha "*"

or add, (*6)

"daimakuai/yii2-captcha": "*"

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

Usage

Once the extension is installed, simply modify your controler, add or change methode actions():, (*8)

    public function actions()
    {
        $this->layout = $this->setting['layout'];
        return [
            'error' => [
                'class' => 'yii\web\ErrorAction',
            ],
            'captcha' => [
                'class' => 'daimakuai\captcha\CaptchaAction',
                'type' => 'numbers', // 'numbers', 'letters' or 'default' (contains numbers & letters)
                'minLength' => 4,
                'maxLength' => 4,
            ],
        ];
    }

在视图里增加 In view ```php use daimakuai\captcha\Captcha; = $form->field($model, 'verifyCode')->widget(Captcha::className()) ?>, (*9)

或增加 or add 'captchaimg','captchaAction'=>'captcha']); ?>, (*10)

在后台Action获取验证码并验证,添加如下代码 Where background checks are needed add., (*11)

createAction('captcha')->validate($captchCode, false); if($check){ //验证码正确 }else{ //验证码错误 } ?>

The Versions

27/01 2018

dev-master

9999999-dev

yii2 captcha

  Sources   Download

BSD-4-Clause

The Requires

 

by yt

yii2 captcha yii2 captcha

27/01 2018

v1.2

1.2.0.0

yii2 captcha

  Sources   Download

BSD-4-Clause

The Requires

 

by yt

yii2 captcha yii2 captcha

27/01 2018

v1.1

1.1.0.0

yii2 captcha

  Sources   Download

BSD-4-Clause

The Requires

 

by yt

yii2 captcha yii2 captcha

27/01 2018

v1.0

1.0.0.0

yii2 captcha

  Sources   Download

BSD-4-Clause

The Requires

 

by yt

yii2 captcha yii2 captcha