atans/yii2-history
Composer 安装命令:
composer require atans/yii2-history
包简介
An active record history for yii2
关键字:
README 文档
README
An active record history extension for yii2
Installation
1.Download
The preferred way to install this extension is through composer.
Either run
composer require atans/yii2-history
or add
"atans/yii2-history": "*"
to the require section of your composer.json file.
Then run
composer update
2.Update database schema
$ php yii migrate/up --migrationPath=@vendor/atans/yii2-history/migrations
Usage
namespace frontend\models\User; class User extends \yii\db\ActiveRecord { /** * @inheritdoc */ public function behaviors() { return [ 'history' => [ 'class' => \atans\history\behaviors\HistoryBehavior::className(), // Options 'allowEvents' => [..], 'ignoreFields' => [...], 'extraFields' => [...], 'debug' => true, // Show the errors ], ]; } }
统计信息
- 总下载量: 1.79k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-12-13