📜  清除日志文件 laravel 命令 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:37.740000             🧑  作者: Mango

代码示例2
//routes/console.php

Artisan::command('logs:clear', function() {

    exec('rm ' . storage_path('logs/*.log'));

    $this->comment('Logs have been cleared!');

})->describe('Clear log files');


//php artisan logs:clear