dev-master
9999999-devYii2 Audit Log. This extension log all models actions -> find/insert/update/delete.
BSD-3-Clause
The Requires
by Nikola Haralamov
extension yii2
Yii2 Audit Log. This extension log all models actions -> find/insert/update/delete.
Yii2 Audit Log. This extension log all models actions -> find/insert/update/delete., (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist lisi4ok/yii2-auditlog "*"
or add, (*4)
"lisi4ok/yii2-auditlog": "*"
to the require section of your composer.json
file., (*5)
Go to yii app folder. and type:, (*6)
./yii migrate --migrationPath=@vendor/lisi4ok/yii2-auditlog/migrations
<?php namespace app\models; use Yii; use lisi4ok\auditlog\behaviors\LoggableBehavior; class MyModel extends \yii\db\ActiveRecord { public function behaviors() { return [ [ 'class' => LoggableBehavior::className(), 'ignoredAttributes' => ['created_at', 'updated_at', 'created_by', 'updated_by'], // default [] 'ignorePrimaryKey' => true, // default false 'ignorePrimaryKeyForActions' => ['insert', 'update'], //default [] Note: (if ignorePrimaryKey set to true, ignorePrimaryKeyForActions is empty will apply for all) 'dateTimeFormat' => 'Y-m-d H:i:s', // default 'Y-m-d H:i:s' ], ]; } }
Yii2 Audit Log. This extension log all models actions -> find/insert/update/delete.
BSD-3-Clause
extension yii2