yiier/yii2-merit
Composer 安装命令:
composer require yiier/yii2-merit
包简介
用于实现积分,等级功能的设计
README 文档
README
用于实现积分,等级功能的设计
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist yiier/yii2-merit "*"
or add
"yiier/yii2-merit": "*"
to the require section of your composer.json file.
Migrations
Run the following command
php yii migrate --migrationPath=@yiier/merit/migrations/
Usage
Configure Controller class as follows :
use use yiier\merit\MeritBehavior; class Controller extends \yii\web\Controller { public function behaviors() { return [ MeritBehavior::className(), ]; } }
Once the extension is installed, simply modify your application configuration as follows:
return [ 'modules' => [ 'merit' => [ 'class' => 'yiier\merit\Module', 'types' => [1 => '积分', 2 => '声望'] // Optional ], ], ];
You can then access Merit Module through the following URL:
http://localhost/path/to/index.php?r=merit/merit
http://localhost/path/to/index.php?r=merit/merit-log
http://localhost/path/to/index.php?r=merit/merit-template
统计信息
- 总下载量: 1.56k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 15
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-03-21