PHP code example of laralogapp / laralog

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

    

laralogapp / laralog example snippets

config/app.php
$ php artisan vendor:publish --provider="Laralog\Laralog\LaralogServiceProvider"
json
{
    "log_entries": [
        {
            "date": "2018-11-04 15:58:56", 
            "environment": "local",
            "level": "ERROR",
            "message": "fread(): Length parameter must be greater than 0 {\"exception\":\"[object] (ErrorException(code: 0): fread(): Length parameter must be greater than 0 at LaraLog/src/LogParser.php:81)\n",
            "stacktrace": "\n#0 [internal function]: Illuminate\\\\Foundation\\\\Bootstrap\\\\HandleExceptions->handleError(2, 'fread(): Length...', '...', 81, Array)\n#1 LaraLog/src/LogParser.php(81): fread(Resource id #252, 0)\n#2 LaraLog/src/LogController.php(51): Laralog\\\\Laralog\\\\LogParser->truncatedLogContents('...')\n#3 [internal function]: Laralog\\\\Laralog\\\\LogController->getLog()\n#4 vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): call_user_func_array(Array, Array)\n#\n..."
        },
        ...
    ]
}