| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not yet rated by the users | Total: 93 | All time:  9,906 This week: 455  | ||||
| Version | License | PHP version | Categories | |||
| yii2-audit-log 1.0 | Free for non-comm... | 5.6 | PHP 5, Databases, Logging, Design Pat... | 
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 (13) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (1 file, 6 directories) | ||||
|    composer.json | Data | Auxiliary data | ||
|    LICENSE.md | Lic. | License text | ||
|    README.md | Doc. | Documentation | ||
|  Files (13) | / | 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 (13) | / | src | / | migrations | 
| File | Role | Description | 
|---|---|---|
|  m190612_092611_tbl_audit_entry.php | Class | Class source | 
|    tbl_audit_entry.sql | Data | Auxiliary data | 
|  Files (13) | / | src | / | models | 
| File | Role | Description | 
|---|---|---|
|  AuditEntry.php | Class | Class source | 
|  AuditEntrySearch.php | Class | Class source | 
|  Files (13) | / | src | / | views | / | audit-entry | 
| File | Role | Description | 
|---|---|---|
|    index.php | Example | Example script | 
|    _search.php | Example | Example script | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| 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.
 If you know an application of this package, send a message to the author to add a link here.