Search
 
SCRIPT & CODE EXAMPLE
 

PHP

clear log file laravel command

truncate -s 0 storage/logs/laravel.log
Comment

How To Clear Laravel.Log In Laravel?

echo "" > storage/logs/laravel.log
Comment

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
Comment

PREVIOUS NEXT
Code Example
Php :: close mysql connection in php 
Php :: if any comma in string in php 
Php :: php get array average 
Php :: get cart page url in woocommerce 
Php :: check the php version in ubuntu 
Php :: get current url in codeigniter 
Php :: php timezone asia dhaka 
Php :: how to remove first element in array php 
Php :: get first key of array php 
Php :: laravel ide helper 
Php :: how to remove index.php in codeigniter 
Php :: php.ini settings 
Php :: laravel make trait command 
Php :: php time limit 
Php :: php difference between two dates in years months and days 
Php :: first character uppercase php 
Php :: how to run specific seeder in laravel 
Php :: start server in laravel 
Php :: how to check history of database in phpmyadmin 
Php :: php timezone for manila 
Php :: wordpress get fiture image 
Php :: Wordpress disable plugin or theme installation 
Php :: var_dump beautifier 
Php :: logout php 
Php :: pretty show php arrays 
Php :: php remove first and last char 
Php :: php array_merge 
Php :: get last inserted id in php 
Php :: laravel controller return message 
Php :: decode jwt token laravel 
ADD CONTENT
Topic
Content
Source link
Name
1+6 =