how to clear all cache in laravel  using one command

In this tutorial, we are going to learn how to clear all cache one command with artisan command-line interface.

php artisan optimize:clear


run simply php artisan optimize:clear

 /laravel-project php artisan optimize:clear                   ok at 11:35:12 pm 
Compiled views cleared!
Application cache cleared!
Route cache cleared!
Configuration cache cleared!
Compiled services and packages files removed!
Caches cleared successfully!


You can also run for better performance

php artisan optimize


 /laravel-project php artisan optimize                      ok at 11:35:15 pm 
Configuration cache cleared!
Configuration cached successfully!
Route cache cleared!
Routes cached successfully!
Files cached successfully!