PHP code example of pkeidel / laralog

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

    

pkeidel / laralog example snippets


\PKeidel\Laralog\Middleware\Logging::class,

config/laralog.php: 'sendlater' => false,
 php
$pklaralog = resolve('pklaralog');

$pklaralog->get('errors')->push([
    'type'      => 'error',
    'time'      => round(microtime(true), 3),
    'exception' => get_class($exception),
    'message'   => $exception->getMessage(),
    'file'      => $exception->getFile(),
    'line'      => $exception->getLine(),
    'route'     => optional(request()->route())->uri() ?? 'unknown',
]);