- Hello, Visitor
- Monday, November 11, 2024
Search Result
How to Clear Cache In Laravel 8
Posted by NzCoding - 12 January 2022
Hello Friends,
In this tutorial, we are going to learn how to clear route cache, laravel application cache, config cache, view cache and reoptimized class in a Laravel 8 application using artisan command-line interface.
Sometimes we need to clear cache when we change something in configuration files or anything change on view files after long time.
The bellow commands will help you to clear cache in laravel 8
Clear Cache:
php artisan clear:cache
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('/cache-clear', function() {Artisan::call('cache:clear');dd("cache clear All");});
Hope it will help you.
Thanks.
Related posts
Building a Task List with Priority Levels in Laravel
Simple User Registration with Laravel Fortify
Building a Simple To-Do List with Laravel Livewire 3: Add & Delete Tasks in Real-Time
Laravel Livewire 3: Building Dynamic Web Apps Made Easy
Live Form Validation with Laravel Livewire
Auto Generate Slug with Laravel Livewire
Laravel Add Data to Database with Database Seeder
Laravel Livewire Crud - Part 04 (Delete Data)
Laravel Livewire Crud - Part 03 (Edit Data)
Laravel Livewire Crud - Part 02 (Get Data from Database)
Laravel Livewire Crud - Part 01 (Add Data to Database)
Laravel Livewire Installation & Layout Setup
Laravel Livewire Image Upload with Preview
Laravel Livewire CRUD with Bootstrap Modal
Popular Posts
Featured Post
Categories
- Html Css 7
- More 3
- Card Design 2
- Spinner 2
- GitHub 2
- Laravel 16
- Livewire 12
- Javascript 1
- Form Design 1
- SEO 1
- Php 0
Leave a Reply