Answers for "how to clear laravel.log with artisan command"

PHP
2

clear log file laravel command

truncate -s 0 storage/logs/laravel.log
Posted by: Guest on May-28-2020
0

clear laravel.log

//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
Posted by: Guest on February-19-2021

Code answers related to "how to clear laravel.log with artisan command"

Browse Popular Code Answers by Language