Answers for "remove content of laravel.log"

PHP
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
0

How To Clear Laravel.Log In Laravel?

echo "" > storage/logs/laravel.log
Posted by: Guest on September-29-2021

Browse Popular Code Answers by Language