PHP code example of yangmingzhi / thinkphp-boost

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

    

yangmingzhi / thinkphp-boost example snippets


return [
    // 工具开关
    'tools' => [
        'routes'   => true,   // get_routes 工具
        'schema'   => true,   // get_database_schema 工具
        'commands' => true,   // run_think_command 工具
        'logs'     => true,   // get_logs 工具
    ],

    // 日志配置
    'logs' => [
        'path'      => runtime_path('log'),  // 日志目录
        'max_lines' => 500,                  // 单次最大读取行数
    ],

    // 命令安全配置
    'commands' => [
        'forbidden' => ['serve', 'clear', 'optimize', 'build'],  // 禁止执行的命令
    ],
];
bash
cp vendor/yangmingzhi/thinkphp-boost/config/boost.php config/boost.php