DEV Community

Cover image for Laravel Cache Clear One-Command Solution
saim
saim

Posted on • Originally published at larainfo.com

Laravel Cache Clear One-Command Solution

In this tutorial, we will learn how to clear all cache with a single command using the Artisan command-line interface.

php artisan optimize:clear
Enter fullscreen mode Exit fullscreen mode

Simply run php artisan optimize:clear to clear the cache.

 /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!
Enter fullscreen mode Exit fullscreen mode

You can also run it for better performance.

php artisan optimize
Enter fullscreen mode Exit fullscreen mode

clear all cache laravel

Top comments (0)