Laravel Clear Cache Using Artisan Command

In this tutorial you will learn about the Laravel Clear Cache Using Artisan Command and its application with practical example.

Larave Clear Cache Using Artisan Command

In this laravel clear cache tutorial, I’ll show you various artisan commands to clear laravel cache of different types. You will also learn to clear cache on share hosting.

In Laravel, while developing a laravel application it is very often that changes we made are not reflecting. This is usually happens because of the laravel cache. Laravel provides various caching systems for developing fast loading laravel applications.

In this laravel clear cache example, we will learn to clear cache from command line (CLI), we will see how to clear cache from blade (views), routes,config etc using the command line and artisan command.

Useful Laravel Clear Cache commands

Here, we will discuss about various artisans commands used to clear different laravel cache in laravel applications.

Laravel Clear App Cache

To clear laravel application cache use the php artisan cache:clear artisan command as given below :

Laravel Clear route cache

To clear route cache in laravel use the php artisan route:clear artisan command as given below :

Laravel Clear config cache

To clear config cache in laravel use the php artisan config:cache artisan command as given below :

Laravel Clear View Cache

To clear compiled view files cache in laravel use the php artisan view:clear artisan command as given below :

Laravel Reoptimized Class

Use the following laravel command to Reoptimized Class In laravel :

Recommended:-  Laravel 5.8 Form Validation Tutorial With Example

Laravel Clear Cache On Shared Host

Most of the times in shared hosting servers we don’t have SSH access to the server. In that case, to clear laravel cache we have define routes in our application’s routes/web.php file that invoke the various laravel clear cache commands. This way we can clear Laravel cache by accessing specific routes in the browser.

Laravel Clear Route Cache from Browser

Laravel Clear Config Cache from Browser

Laravel Clear Application Cache from Browser

Laravel Clear View Cache from Browser

In this tutorial we have learn about the Laravel Clear Cache Using Artisan Command and its application with practical example. I hope you will like this tutorial.