In this tutorial, we will learn Laravel 8 Clear Cache of Route, View, Config Command with Example
Clear Cache:
php artisan cache:clear
Clear Route Cache:
php artisan route:cache
Clear View Cache:
php artisan view:clear
Clear Config Cache:
php artisan config:cache
You can also clear cache without command using route. so you can create route as like bellow:
Route::get('/clear-cache-all', function() {
Artisan::call('cache:clear');
dd("Cache Clear All");
});
May this example help you.