How to Clear cache in Laravel?

Posted by LaravelIndia - 4 months ago

Clear Cache in Laravel (Terminal)

1. Clear Application Cache

php artisan cache:clear

2. Clear route cache

php artisan route:cache  

3. Clear config cache

php artisan config:cache  

4. Clear compiled view files

php artisan view:clear 

Clear Cache in Laravel (Browser)

Route::get('/clear-cache', function() {
    Artisan::call('cache:clear');
    return "Good Luck Cache is cleared";
});