developit/yii2-captcha
最新稳定版本:1.2
Composer 安装命令:
composer require developit/yii2-captcha
包简介
yii2 captcha
README 文档
README
yii2 captcha with Ability to recognize Arabic and Persian numbers.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist developit/yii2-captcha "*"
or add
"developit/yii2-captcha": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply modify your controler, add or change methode actions():
public function actions() { $this->layout = $this->setting['layout']; return [ 'error' => [ 'class' => 'yii\web\ErrorAction', ], 'captcha' => [ 'class' => 'developit\captcha\CaptchaAction', 'type' => 'numbers', // 'numbers', 'letters' or 'default' (contains numbers & letters) 'minLength' => 4, 'maxLength' => 4, ], ]; }
In view
use developit\captcha\Captcha; <?= $form->field($model, 'verifyCode')->widget(Captcha::className()) ?>
统计信息
- 总下载量: 19k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2016-09-27