Laravel 8.0 Clear Cache of Route, View, Config Command Example

  • 1 min read

In this post, I will show you laravel 8 clear cache. You will learn laravel 8 clear cache config. In this post, you can learn how to clear cache view. We will learn laravel 8 cache clear. You also learn how to clear the cache of routes.

Read also : How to create a laravel 8.0 project example

Sometimes we need to cache clear when you change in a configuration file or anything change on the view file after a long time.Laravel 8.0 cache clear, route clear and view clear are also very important somethimes when something changed withing the project. so the bellow command will help you to clear cache in laravel 8.

Clear View Cache

php artisan view:clear

Clear Cache

php artisan cache:clear

Clear Route Cache

php artisan route:cache

Clear Config Cache

php artisan config:cache

You can also clear cache without command using the route. so you can create a route as like bellow:

Route::get('/clear-cache-all', function() {

    dd("Cache Clear All");
Read also Official doc

Hope it will help you!