PHP code example of wolf-leo / phplogviewer

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

    

wolf-leo / phplogviewer example snippets


    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\thinkphp\LogViewer())->fetch();
    }

    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\laravel\LogViewer())->fetch();
    }

    // 如果项目中采用 laravel 组件
    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\webman\laravel\LogViewer())->fetch();
    }

    // 如果项目中采用 thinkphp 组件
    public function test()
    {
        return (new \Wolfcode\PhpLogviewer\webman\thinkphp\LogViewer())->fetch();
    }


return [

    // 日志标题
    'title'          => 'ThinkPHP 日志查看器',

    // 默认显示日志应用模块
    'default_module' => 'index',

    // 常用的日志应用模块
    'modules'        => [
        'admin',
        'home',
        'index',
        'api'
    ],
    
    // layui css 路径 如不设置,将默认调用公共CDN资源
    'layui_css_path' => '',
    // layui js 路径 如不设置,将默认调用公共CDN资源
    'layui_js_path'  => '',
    
];