PHP code example of willypelz / laravel-log-platform

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

    

willypelz / laravel-log-platform example snippets


return [
    'default_strategy' => 'daily',        // daily | weekly | monthly | custom

    'ui' => [
        'theme'       => 'auto',           // light | dark | auto
        'logs_per_page' => 100,
    ],

    'files' => [
        'allow_download' => true,
        'allow_delete'   => true,
    ],

    'retention' => [
        'enabled' => false,                // enable log:clear command
        'days'    => 30,
    ],

    'additional_folders' => [],            // extra absolute paths to scan
];

// config/logging.php
'channels' => [
    'custom' => [
        'driver'   => 'custom',
        'via'      => \Willypelz\LogPlatform\Handlers\StrategyRotatingFileHandler::class,
        'strategy' => 'weekly',   // or 'monthly', 'custom'
    ],
],

'security' => [
    'middleware'    => ['api', 'auth:sanctum'],
    'ui_middleware' => ['web', 'auth'],
],
bash
php artisan log:install
bash
php artisan vendor:publish --tag=log-platform-config