Download .zip |
Info | Documentation | View files (13) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2019-07-04 (27 days ago) | Not yet rated by the users | Total: 44 This week: 2 | All time: 9,585 This week: 104 |
Version | License | PHP version | Categories | |||
yii2-audit-log 1.0 | Free for non-comm... | 5.6 | PHP 5, Databases, Logging, Design Pat... |
Description | Author | |||
This package can be used to create logs to track changes in database records. Innovation Award
|
|
Yii2 audit record and database changes details
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist ruturajmaniyar/yii2-audit-log:"dev-master"
or
php composer.phar require --prefer-dist ruturajmaniyar/yii2-audit-log:"dev-master"
or add
"ruturajmaniyar/yii2-audit-log": "dev-master"
to the require section of your composer.json
file.
To run migration to create "tbl_audit_entry" table in your db.
php yii migrate/up --migration-path "@vendor/ruturajmaniyar/yii2-audit-log/src/migrations/"
or
you can also import "tbl_audit_entry.sql" directly in your DB.
Add Audit Entry module in your config file
....
'modules' => [
......
'auditlog' => [
'class' => 'ruturajmaniyar\mod\audit\AuditEntryModule'
],
......
],
....
Add DateTimeHelper components in your config file
....
'components' => [
......
'dateTimeConversion' => [
'class' => 'ruturajmaniyar\mod\audit\components\DateTimeHelper'
],
......
],
....
Use get audit log activities or records, attached "AuditEntryBehaviors" with your models as belows:
use ruturajmaniyar\mod\audit\behaviors\AuditEntryBehaviors;
use yii\db\ActiveRecord;
class User extends ActiveRecord {
public function behaviors(){
return [
....
'auditEntryBehaviors' => [
'class' => AuditEntryBehaviors::class
],
....
];
}
}
Files |
File | Role | Description | ||
---|---|---|---|---|
src (1 file, 6 directories) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE.md | Lic. | License text | ||
README.md | Doc. | Documentation |
Files | / | src |
File | Role | Description | ||
---|---|---|---|---|
behaviors (1 file) | ||||
components (1 file) | ||||
controllers (1 file) | ||||
migrations (2 files) | ||||
models (2 files) | ||||
views (1 directory) | ||||
AuditEntryModule.php | Class | Class source |
Files | / | src | / | migrations |
File | Role | Description |
---|---|---|
m190612_092611_tbl_audit_entry.php | Class | Class source |
tbl_audit_entry.sql | Data | Auxiliary data |
Files | / | src | / | models |
File | Role | Description |
---|---|---|
AuditEntry.php | Class | Class source |
AuditEntrySearch.php | Class | Class source |
Files | / | src | / | views | / | audit-entry |
File | Role | Description |
---|---|---|
index.php | Example | Example script |
_search.php | Example | Example script |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.