2017 © Pedro Peláez
 

yii2-extension yii2-log

Activity Logs function model

image

hendrignwn/yii2-log

Activity Logs function model

  • Wednesday, November 2, 2016
  • by HendriGnwn
  • Repository
  • 1 Watchers
  • 1 Stars
  • 41 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 14 % Grown

The README.md

Yii2-Log

The main function is to record the changes in the model. * There is a feature to allow users see these logs., (*1)

Installation

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',
            ....
        ];
    }

Usage

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)

License

Hendri Gunawan, (*10)

The Versions

02/11 2016

dev-master

9999999-dev

Activity Logs function model

  Sources   Download

propietary

The Requires

 

by Hendri Gunawan

log yii2