PHPackages                             rmrevin/yii2-changelog - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rmrevin/yii2-changelog

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

rmrevin/yii2-changelog
======================

Active record changelog extension for Yii 2 framework

1.0.1(9y ago)102984[3 issues](https://github.com/rmrevin/yii2-changelog/issues)MITPHPPHP &gt;=5.4.0

Since Dec 28Pushed 8y ago3 watchersCompare

[ Source](https://github.com/rmrevin/yii2-changelog)[ Packagist](https://packagist.org/packages/rmrevin/yii2-changelog)[ RSS](/packages/rmrevin-yii2-changelog/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (8)Used By (0)

Active record changelog extension for Yii 2 framework
=====================================================

[](#active-record-changelog-extension-for-yii-2-framework)

This extension provides a changelog functional.

For license information check the [LICENSE](https://github.com/rmrevin/yii2-changelog/blob/master/LICENSE)-file.

Support
-------

[](#support)

- [GitHub issues](https://github.com/rmrevin/yii2-changelog/issues)
- [Public chat](https://gitter.im/rmrevin/support)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](https://getcomposer.org/).

Either run

```
composer require "rmrevin/yii2-changelog:~1.0"
```

or add

```
"rmrevin/yii2-changelog": "~1.0",

```

to the `require` section of your `composer.json` file.

Execute migrations:

```
php yii migrate --migrationPath=@rmrevin/yii/changelog/migrations

```

Usage
-----

[](#usage)

To view the history, you can use a special panel for debug. Or make your own section to view the data in your administration panel.

To enable the debug panel, add the following code in the module configuration debug.

```
    'modules' => [
        // ...
        'debug' => [
            'class' => yii\debug\Module::className(),
            'panels' => [
                rmrevin\yii\changelog\debug\panels\ChangelogPanel::class,
            ],
        ],
    ],
```

For `ActiveRecord` models for which you want to track changes, you must implement the interface `rmrevin\yii\changelog\interfaces\LoggableInterface`and add the behavior of `rmrevin\yii\changelog\behaviors\ChangelogBehavior`.

Example:

```
