PHP code example of yuanrun / laravel-log-viewer

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

    

yuanrun / laravel-log-viewer example snippets



return [
    'route' => [
        // 路由前缀
        'prefix'     => 'dcat-logs',
         // 命名空间
        'namespace'  => 'Dcat\LogViewer',
         // 中间件
        'middleware' => [],
    ],

    // 日志目录
    'directory' => storage_path('logs'),

    // 搜索页显示条目数(搜索后不分页,所以这个参数可以设置大一些)
    'search_page_items' => 500,

    // 默认每页条目数
    'page_items' => 30,
];
bash
php artisan vendor:publish --tag=dcat-log-viewer