定制 exertis/yii2-save-with-audit-trail-behavior 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

exertis/yii2-save-with-audit-trail-behavior

最新稳定版本:v1.0.7

Composer 安装命令:

composer require exertis/yii2-save-with-audit-trail-behavior

包简介

Adds a $model->saveWithAuditTrail() method to your Models allowing you to annotate changes to your data.

README 文档

README

Adds a $model->saveWithAuditTrail() method to your Models allowing you to annotate changes to your data.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist exertis/yii2-save-with-audit-trail-behavior "*"

or add

"exertis/yii2-save-with-audit-trail-behavior": "*"

to the require section of your composer.json file.

Database Setup

You need to run some migrations to setup the Audit Trail table.

php yii migrate --migrationPath=@vendor/exertis/yii2-save-with-audit-trail-behavior/migrations

Configuring

First you need to configure model as follows:

use exertis\savewithaudittrail\SaveWithAuditTrailBehavior;

class Post extends ActiveRecord
{
    public function behaviors() {
        return [
            [
                'class' => SaveWithAuditTrailBehavior::className(),
            ],
        ];
    }
}

统计信息

  • 总下载量: 250
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-12-03