PHP code example of asd-lt / action-log

1. Go to this page and download the library: Download asd-lt/action-log 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/ */

    

asd-lt / action-log example snippets


'defaults' => [
    // ...
    'action_log_guard' => 'guard',
],

use Asd\ActionLog\Models\Traits\ActionLogTrait;

class Model {
    use ActionLogTrait;
    // ...
}

class Model {
    // log only these column changes
    protected $loggableFields = [
        'column1',
        'column2',
    ];
}

class Model {
    // exclude columns from logging changes
    protected $actionLogAttributesExcept = [
        'column3',
        'column4',
    ];
}
bash
php artisan migrate