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 :: expose loading laravel 
Php :: laravel collection take 
Php :: curlopt_postfields php example 
Php :: get current content type 
Php :: session variable 
Php :: Update Data Multiple Columns MySql Database Table PHP Function 
Php :: php artisan websockets serve 
Php :: php sqlite last insert id 
Php :: php preg_replace function 
Php :: onclick on image php 
Php :: bool value of blank string inp php 
Php :: laravel validation messages 
Php :: php monolog 
Php :: what are the different types of PHP variables? 
Php :: php code add text on existing pdf file 
Php :: php object to json 
Php :: laravel repository design pattern 
Php :: The last ship -inurl:(htm/html/php/pls/txt) intitle:index.of "last modified" (mp4/wma/aac/avi) 
Php :: array filter php get first object 
Php :: mail function php not working 
Php :: php create array 
Php :: require password confirm laravel 
Php :: how to catch duplicate entry to database in laravel 
Php :: php backend generator 
Php :: queue jobs in laravel 
Php :: check if is the last day of the month php 
Php :: laravel 8 cron job 
Php :: auto logout when session expires laravel 
Php :: Use the DebugBar like an array where keys are the collector names 
Php :: export laravel path fedora 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =