In PHP's Laravel, how do I clear laravel.log? - Stack Overflow

PHOTO EMBED

Fri Jun 24 2022 04:34:00 GMT+0000 (UTC)

Saved by @nladev #php

Artisan::command('logs:clear', function() {
    
    exec('rm -f ' . storage_path('logs/*.log'));

    exec('rm -f ' . base_path('*.log'));
    
    $this->comment('Logs have been cleared!');
    
})->describe('Clear log files');
content_copyCOPY

https://stackoverflow.com/questions/28127495/in-phps-laravel-how-do-i-clear-laravel-log