PHP code example of logio-dev / laravel-driver

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

    

logio-dev / laravel-driver example snippets


return [

    'channels' => [
        'logio' => [
            'driver' => 'monolog',
            'level' => env('LOG_LEVEL', 'debug'),
            'handler' => Logio\LogioHandler::class,
            'handler_with' => [
                'key' => env('LOGIO_API_KEY'),
                'maxBuffer' => env('LOGIO_MAX_BUFFER', 0),
                'endpoint' => env('LOGIO_API_ENDPOINT', 'https://api.logio.dev'),
            ],
        ],  
    ],

];



namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
    /**
     * The application's global HTTP middleware stack.
     *
     * These middleware are run during every request to your application.
     *
     * @var array
     */
    protected $middleware = [
        // \App\Http\Middleware\TrustHosts::class,
        \App\Http\Middleware\TrustProxies::class,
        \Fruitcake\Cors\HandleCors::class,
        \App\Http\Middleware\PreventRequestsDuringMaintenance::class,
        \Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
        \App\Http\Middleware\TrimStrings::class,
        \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
        
        \Logio\Http\Middleware\FlushBufferMiddleware::class,
    ];
dotenv
LOG_CHANNEL=logio
LOGIO_API_KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx