Web Prepration

Web Concept Tutorials

Laravel, Laravel 7, Laravel 8

In this articale, you will learn how to clear caches in laravel application. In laravel application you can clear cache two types using artisan command and from browsers.

I will mention few commands you can use to clear various types of cache like config cache, view cache, route cache and application cache from your laravel application.

If you want to clear cache using commnad then open your terminal and go to the laravel application’s folder and execute below commands:

Clear Application Cache

To clear laravel application cache, run the following artisan command:

Clear Route Cache

To clear route cache of your Laravel application run the following artisan command:

Clear Configuration Cache
To clear the config cache of your laravel application, run the following artisan command:

Clear Compiled Views Cache
To clear the view cache of your laravel application which are basically compiled view files, run the following artisan command:

If you want to clear cache through browser then we need to run these commands programatically because sometimes hard to get console access to your laravel application. So this method is very easy and helpfull Clear Cache in Laravel using Browser.

Thus, we will create special routes to clear cache in Laravel.

 

0 comment on How to Clear Cache in Laravel using Artisan Command

Write a comment

Your email address will not be published. Required fields are marked *