laravel cache clear

Today, We want to share with you laravel cache clear.In this post we will show you laravel cache clear on live server, hear for Laravel 7.x and 6.x Clear Cache Using Artisan Command we will give you demo and example for implement.In this post, we will learn about Laravel Clears allCaches Using Artisan Command (CLI) with an example.

Here is list of commands that will help you to cache clear: laravel cache clear

We are ref. for cache clear: Cache – Laravel – The PHP Framework For Web Artisans

laravel cache clear

laravel delete cache files manually

As I will cover this Post with live Working example to develop How to Delete cache in Laravel 7/6/5, so the List of the cache clear commands, see below is used for this example is following below.

Laravel Clearing Cache Using Artisan Command (CLI)

List of the cache Clearing commands, see below

Clearing Route Cache

Use the below command and Clearing your routes cache :

php artisan route:cache

Clearing Cache Laravel Application

Use the below command and Clearing your application cache :

php artisan cache:clear

Laravel Clearing Config Cache

Use the below command and Clearing your config cache :

php artisan config:cache

Clearing View Cache Laravel

Use the below command and Clearing your view (blade) cache :

php artisan view:clear

Reoptimized Class

php artisan optimize

clearing all cache outside CLI


Route::get('/clearing', function() {


   return "Cleared!";


Laravel clearing cache from route, view, config and all cache data from Web application


 //clearing route cache:
 Route::get('/route-cache', function() {
     $exitCode = Artisan::call('route:cache');
     return 'Routes cache cleared';

 //clearing config cache:
 Route::get('/config-cache', function() {
     $exitCode = Artisan::call('config:cache');
     return 'Config cache cleared';

// clearing application cache:
 Route::get('/clearing-cache', function() {
     $exitCode = Artisan::call('cache:clear');
     return 'Application cache cleared';

 // clearing view cache:
 Route::get('/view-clearing', function() {
     $exitCode = Artisan::call('view:clear');
     return 'View cache cleared';

php artisan clear:data

and it will run the following commands automcatically

Also Read This 👉   C# Named and Optional Arguments Tutorial with Examples

php artisan cache:clear
php artisan view:clear
php artisan route:clear
php artisan clear-compiled
php artisan config:cache

Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about Laravel Delete cache from route, view, config and all cache data from application.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.