PHP code example of panwenbin / yii2-activerecord-changelog

1. Go to this page and download the library: Download panwenbin/yii2-activerecord-changelog library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

panwenbin / yii2-activerecord-changelog example snippets


    public function behaviors()
    {
        return [
            [
                'class' => ActiveRecordChangeLogBehavior::className(),
                'ignoreAttributes' => ['updated_at'],
            ],
        ];
    }

    'modules' => [
        'ar' => [
            'class' => 'panwenbin\yii2\activerecord\changelog\Module',
        ],
    ]
bash
php yii migrate --migrationPath=@panwenbin/yii2/activerecord/changelog/migrations