Skip to content

liviuk2/yii2-activerecord-history

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 ActiveRecord History Extension for Yii 2

This extension adds storage history of changes to the AR model

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require nhkey/yii2-activerecord-history "*"

or add

"nhkey/yii2-activerecord-history": "*"

to the require section of your composer.json.

If you are using DBManager as Manager, you need to run

php yii migrate --migrationPath=@vendor/nhkey/yii2-activerecord-history/migrations

Add in config/web.php in the modules section the configuration.

    'arh' =>  [
        'class' => '\nhkey\arh\Module',
        'allowedPermissions' => ['visualizzaStoricoModifiche']
    ],

Usage

If the property is not specified, the default manager is DBManager. In the extension is two managers: DBManager and FileManager. You can extend the class BaseManager.

There are two way how usage this extension:

Update to 1.1.2

For update you need to run:

php yii migrate --migrationPath=@vendor/nhkey/yii2-activerecord-history/migrations

Credits

Author: Mikhail Mikhalev

Email: [email protected]

About

The extension adds storage history of changes to the AR model

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%