because Laravel 5 is deprecated now, the answers are not good enough.
So I explain for Laravel > 7
I read all the answers but none of them contain optimize:clear so I want to write my answer for future users.
optimize:clear is the most powerful command to clean all the caches
in Laravel >= 7 you have this command for clearing all the caches
Command:
php artisan optimize:clear
It will clear: Compiled views, Application cache, Route cache, Configuration cache, Compiled services and packages.
It is not harmful at all. and it won't affect any single line of your codes. it just will clear all your cached files.
after running this command you will see:
Compiled views cleared!
Application cache cleared!
Route cache cleared!
Configuration cache cleared!
Compiled services and packages files removed!
Caches cleared successfully!