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');
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter