PHP code example of hasnularief / auditor

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

    

hasnularief / auditor example snippets


Hasnularief\Auditor\AuditorServiceProvider::class,

use Hasnularief\Auditor\AuditorTrait;

class User extends Model
{
    use AuditorTrait;

use Hasnularief\Auditor\AuditorObserver;

class User extends Model
{
    protected static function boot()
    {
        parent::boot();
        $request = request();
        static::observe(new AuditorObserver($request));
    }
shell
php artisan vendor:publish --tag=auditor