add history of changes to all entitys

This commit is contained in:
vladrigos
2020-08-06 13:19:20 +03:00
parent 812bb2b23a
commit 6aff5567c4
16 changed files with 174 additions and 19 deletions

View File

@ -44,6 +44,15 @@ class Note extends \common\models\Note
}
}
public function behaviors()
{
return [
'log' => [
'class' => \common\behaviors\LogBehavior::class,
]
];
}
public function afterSave($insert, $changedAttributes)
{
$post = \Yii::$app->request->post('Note');