Yii2 User DB modifications logger
Yii2 User DB modifications logger. Save modifications your tables., (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist podtserkovsky/yii2-user-db-log "*"
or add, (*4)
"podtserkovsky/yii2-user-db-log": "*"
to the require section of your composer.json file., (*5)
Usage
For demo install advanced yii https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-installation.md#installing-using-composer
Create database and run initial migrations, (*6)
Apply migrations, run in console:, (*7)
php yii migrate --migrationPath=@vendor/podtserkovsky/yii2-user-db-log/migrations
Add in your app config:, (*8)
'modules' => [
'user-db-log' => [
'class' => 'podtserkovsky\userdblog\Module',
],
],
Simply use it in your code by in any ActiveRecord class :, (*9)
public function behaviors()
{
return [
[
'class' => UserDbLogBehavior::className()
],
];
}
``
You can then access Log through the following URL:, (*10)
http://localhost/path/to/index.php?r=user-db-log
or if you have enabled pretty URLs, you may use the following URL:, (*11)
http://localhost/path/to/index.php/user-db-log