PHP code example of kyagie / laravel-auditing-filesystem

1. Go to this page and download the library: Download kyagie/laravel-auditing-filesystem 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/ */

    

kyagie / laravel-auditing-filesystem example snippets


composer 

    ...
    'drivers' => [
        'database' => [
            'table'      => 'audits',
            'connection' => null,
        ],
        'filesystem' => [
            'disk'         => 'local',
            'dir'          => 'audit',
            'filename'     => 'audit.csv',
            'logging_type' => 'single',
        ],
    ],
    ...


namespace App\Models;

use Kyagie\Auditing\Drivers\FilesystemDriver;
use Illuminate\Database\Eloquent\Model;
use OwenIt\Auditing\Auditable;
use OwenIt\Auditing\Contracts\Auditable as AuditableContract;

class SomeModel extends Model implements AuditableContract
{
    use Auditable;

    /**
     * Filesystem Audit Driver
     *
     * @var Kyagie\Auditing\Drivers\Filesystem
     */
    protected $auditDriver = FilesystemDriver::class;

    // ...
}

return [
    // ...

    'driver' => Kyagie\Auditing\Drivers\FilesystemDriver::class,

    // ...
];