PHP code example of sourcetoad / logger

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

    

sourcetoad / logger example snippets


php artisan vendor:publish --tag=logger

use Sourcetoad\Logger\Enums\ModelMapping;
 
'morphs' => [
   ModelMapping::USER => 'App\User'
];

use Sourcetoad\Logger\Traits\Trackable;
  
class Model {
    use Trackable;
}

$schedule->command('logger:audit-resolver')
    ->hourly()
    ->withoutOverlapping();

public function trackableUserResolver()
{
    return $this->object->relation->user_id;
}