Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

How to clear laravel.log in PHP Laravel

laravel.log is a file that collects all the Log messages by default into it

Sometimes you need to truncate this log file for troubleshooting the application

Command to be used to clear laravel.log:
cd <your project home directory>
truncate -s 0 storage/logs/laravel.log

How to verify the above solution:
vi storage/logs/laravel.log (This must show you the laravel.log having no lines)

Chetan