PHP code example of decoda / audit

1. Go to this page and download the library: Download decoda/audit 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/ */

    

decoda / audit example snippets


class JobModel extends Model
{
	use \Decoda\Audit\Traits\AuditTrait;
	protected $afterInsert = ['auditInsert'];
	protected $beforeUpdate = ['auditBeforeUpdate'];
	protected $afterUpdate = ['auditAfterUpdate'];
	protected $afterDelete = ['auditDelete'];

class JobModel extends Model
{
	use \Decoda\Audit\Traits\AuditTrait;

	protected $afterInsert = ['auditInsert'];
	protected $afterUpdate = ['auditUpdate'];
	protected $afterDelete = ['auditDelete'];