DEV Community

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

Posted on • Originally published at larainfo.com

1

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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay