PHP code example of submtd / laravel-custom-log

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

    

submtd / laravel-custom-log example snippets




use Submtd\LaravelCustomLog\HasCustomLog;

class Person
{
    use HasCustomLog;
    
    /**
     * logChannel method
     * Method used to define a custom log channel for this class.
     * @return array -- return a Laravel log channel array
     **/
    public static function logChannel()
    {
        return [
            'driver' => 'single',
            'path' => storage_path('logs/person.log'),
            'level' => 'warning',
        ];
    }
}