Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rezaei121/yii2-captcha
yii2 captcha with Ability to recognize Arabic and Persian numbers.
https://github.com/rezaei121/yii2-captcha
arabic-captcha captcha persian-captcha yii yii2-captcha
Last synced: 3 months ago
JSON representation
yii2 captcha with Ability to recognize Arabic and Persian numbers.
- Host: GitHub
- URL: https://github.com/rezaei121/yii2-captcha
- Owner: rezaei121
- License: gpl-3.0
- Created: 2016-09-25T13:27:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-05T17:56:22.000Z (over 7 years ago)
- Last Synced: 2024-08-08T16:32:47.184Z (6 months ago)
- Topics: arabic-captcha, captcha, persian-captcha, yii, yii2-captcha
- Language: PHP
- Homepage: http://www.developit.ir/
- Size: 63.5 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
yii2 captcha
============
yii2 captcha with Ability to recognize Arabic and Persian numbers.![screenshot](http://www.developit.ir/tmp/captcha.jpg)
Installation
------------The preferred way to install this extension is through [composer](http://getcomposer.org/download/).
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()`:
```php
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
```php
use developit\captcha\Captcha;
=
$form->field($model, 'verifyCode')->widget(Captcha::className())
?>