dev-master
9999999-devActivity Logs function model
propietary
The Requires
- php >=5.4.0
- yiisoft/yii2 *
- yiisoft/yii2-bootstrap *
by Hendri Gunawan
log yii2
Activity Logs function model
The main function is to record the changes in the model. * There is a feature to allow users see these logs., (*1)
The preferred way to install this extension is through composer. After, either run, (*2)
php composer.phar require --prefer-dist hendrignwn/yii2-log
or add, (*3)
"hendrignwn/yii2-log": "dev-master"
to the require section of your composer.json
file.
run migration for database, (*4)
yii migrate --migrationPath=@hendrignwn/log/migrations
add in modules section of main config, (*5)
'modules' => [ ... 'log-module' => [ 'class' => hendrignwn\log\LogModule::className(), ], ... ]
add in the Model that you want to Log into function behavior(), (*6)
public function behaviors() { return [ ... 'hendrignwn\log\behaviors\LogBehavior', ... ]; }
or add in the parent Models if it is to set up the model that you want in the Log but this code 'hendrignwn\log\behaviors\LogBehavior' not be reused., (*7)
public function behaviors() { return [ .... 'hendrignwn\log\behaviors\LoggableBehavior', .... ]; }
Once the extension is installed, check the url: [your application base url]/index.php/log-module, (*8)
Note: This Log only be accessed if the user has been logged. Otherwise it will be a error 403 permission access not allowed., (*9)
Hendri Gunawan, (*10)
Activity Logs function model
propietary
log yii2