Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #clear
ADD COMMENT
Topic
Name
1+3 =