atans/yii2-actionlog

Yii2 action log extension

Installs: 95

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

1.0.5 2017-01-24 07:18 UTC

This package is auto-updated.

Last update: 2024-04-13 22:09:57 UTC


README

An action log extension for yii2

Installation

1.Download

The preferred way to install this extension is through composer.

Either run

composer require atans/yii2-actionlog

or add

"atans/yii2-actionlog": "*"

to the require section of your composer.json file.

2.Update database schema

$ php yii migrate/up --migrationPath=@vendor/atans/yii2-actionlog/migrations

Usage

<?php
use atans\actionlog\models\ActionLog;

ActionLog::error('Some error message');
ActionLog::info('Some info message');
ActionLog::warning('Some warning message');
ActionLog::success('Some success message');


$data = ['success' => true, 'message' => 'Successfully']; // optional
$category = 'application'; // optional
ActionLog::success('Some success message', $data, $category);

Management

Visit http://path/to/yii/?r=actionlog/admin using logged in account which role is admin

You can change the role at @vendor/atans/yii2-actionlog/Module.php