PHPackages                             myzero1/yiirbacp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. myzero1/yiirbacp

ActiveYii2-module[Utility &amp; Helpers](/categories/utility)

myzero1/yiirbacp
================

Simple captcha for yii2.Just add the module in config file and use the widget.

07PHP

Since Nov 30Pushed 8y agoCompare

[ Source](https://github.com/myzero1/yiirbacp)[ Packagist](https://packagist.org/packages/myzero1/yiirbacp)[ RSS](/packages/myzero1-yiirbacp/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (2)Used By (0)

yii2-rbacp
==========

[](#yii2-rbacp)

Simple captcha for yii2.Just add the module in config file and use the widget.

Installation
------------

[](#installation)

The preferred way to install this module is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require myzero1/yii2-captcha：1.*

```

or add

```
"myzero1/yii2-captcha": "~1"

```

to the require section of your `composer.json` file.

Setting
-------

[](#setting)

Once the extension is installed, simply modify your application configuration as follows:

```
return [
	// ...
    'bootstrap' => ['captcha',...],
    'modules' => [
        'captcha' => [
            'class' => 'myzero1\captcha\Module',
            // 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
            // 'backColor' => 0x605ca8,//背景颜色
            // 'maxLength' => 3, //最大显示个数
            // 'minLength' => 3,//最少显示个数
            // 'padding' => 5,//间距
            // 'height' => 40,//高度
            // 'width' => 80,  //宽度
            // 'foreColor' => 0xffffff,     //字体颜色
            // 'offset' => 4,        //设置字符偏移量 有效果
            // 'transparent' => false,        //设置字符偏移量 有效果
        ],
        // ...
    ],
    // ...
];
```

Usage
-----

[](#usage)

Add upload widget like following:

```

echo \myzero1\captcha\widgets\Captcha::widget([
    'model' => new \myzero1\captcha\models\Captcha(['scenario'=>'js']),
    // 'model' => new \myzero1\captcha\models\Captcha(['scenario'=>'jsPhp']),
    'attribute' => 'verifyCode',
    'imageOptions'=>[
        'alt'=>'点击换图',
        'title'=>'点击换图',
        'style'=>'cursor:pointer'
    ]
]);

```

With ActiveForm

```

echo  $form
// ->field(new \myzero1\captcha\models\Captcha(['scenario'=>'php']),'verifyCode')
->field(new \myzero1\captcha\models\Captcha(['scenario'=>'jsPhp']),'verifyCode')
->widget(
    myzero1\captcha\widgets\Captcha::className(),
    [
        'imageOptions'=>[
            'alt'=>'点击换图',
            'title'=>'点击换图',
            'style'=>'cursor:pointer'
        ]
    ]
)

```

The scenario discretion

- php: Just validate by PHP.
- jsPhp: validate by JS and PHP

You can access Demo through the following URL:

```
http://localhost/path/to/index.php?r=captcha/default/demo

```

or if you have enabled pretty URLs, you may use the following URL:

```
http://localhost/path/to/index.php/captcha/default/demo

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22048203?v=4)[myzero1](/maintainers/myzero1)[@myzero1](https://github.com/myzero1)

---

Top Contributors

[![myzero1](https://avatars.githubusercontent.com/u/22048203?v=4)](https://github.com/myzero1 "myzero1 (2 commits)")[![mywoogle](https://avatars.githubusercontent.com/u/8934318?v=4)](https://github.com/mywoogle "mywoogle (1 commits)")

### Embed Badge

![Health badge](/badges/myzero1-yiirbacp/health.svg)

```
[![Health](https://phpackages.com/badges/myzero1-yiirbacp/health.svg)](https://phpackages.com/packages/myzero1-yiirbacp)
```

###  Alternatives

[stefangabos/zebra_pagination

A generic, Twitter Bootstrap compatible, PHP pagination library that automatically generates navigation links

11122.9k](/packages/stefangabos-zebra-pagination)[dannyvanholten/acf-gravityforms-add-on

Advanced Custom Fields: Gravity Forms Add-on

7943.0k](/packages/dannyvanholten-acf-gravityforms-add-on)[danielme85/laravel-cconverter

Laravel 5 plug-in for currency conversion

42101.1k](/packages/danielme85-laravel-cconverter)[inpsyde/google-tag-manager

Adds the Google Tag Manager container snippet to your site and populates the Google Tag Manager Data Layer.

2359.7k](/packages/inpsyde-google-tag-manager)[cagartner/bagisto-brazilcustomer

112.9k](/packages/cagartner-bagisto-brazilcustomer)[codein/ibexa-seo-toolkit

Ibexa Toolkit to advise users on best SEO practices.

112.5k](/packages/codein-ibexa-seo-toolkit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
