Skip to content

A simplified Yii2 module for tracking user web-based activities

License

Notifications You must be signed in to change notification settings

r2am9d/yii2-activity-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Activity Log Module


A simplified Yii2 module for tracking user web-based activities

Installation

The preferred way to install this module is through composer:

Either run

php composer.phar require --prefer-dist r2am9d/yii2-activity-log

or add to the require-dev section of your composer.json file.

"r2am9d/yii2-activity-log": "*"

Once the extension is installed, simply add the lines below to your "modules" application configuration.

return [
    'modules' => [
        'activity-log' => [
            'class' => 'r2am9d\activitylog\Module',
        ],
    ],
];

Then add these lines to your "controllerMap" application configuration.

return [
    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
            'migrationNamespaces' => [
                'r2am9d\activitylog\migrations',
            ],
        ],
    ],
];

Lastly, run the migrations.

~$ php yii migrate

Usage

Apply the custom behavior to your Controller or Model class via inherited "behaviors" function.

/**
 * {@inheritdoc}
 */
public function behaviors()
{
    return [
        \r2am9d\activitylog\behaviors\ActivityLogBehavior::className(),
    ];
}

Accessing module

You can then access the module through the following URL:

http://localhost/path/to/index?r=activity-log

or if you have enabled pretty URLs, you may use the following URL:

http://localhost/path/to/index/activity-log

About

A simplified Yii2 module for tracking user web-based activities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages