Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clear all cache in Laravel with artisan [duplicate]

Tags:

php

laravel

I have the following error every time I try to clear the cache in Laravel 7.

Class 'App\Providers\TranslationServiceProvider' not found

I removed my provider but it still exists in the cache. I don't want to remove manually directory /bootstrap/cache. Does exist any artisan command which will take care of flushing all cache without any error?

I have already tried without any effect:

artisan config:cache
artisan config:clear
artisan cache:clear
artisan optimize
like image 279
Jsowa Avatar asked Nov 05 '25 01:11

Jsowa


2 Answers

Clear All, run:

php artisan optimize:clear

result:

Cached events cleared! 
Compiled views cleared! 
Application cache cleared! 
Route cache cleared! 
Configuration cache cleared! 
Compiled services and packages files removed! 
Caches cleared successfully!
like image 123
Jatniel Avatar answered Nov 07 '25 14:11

Jatniel


Use composer dump-autoload to clear the providers cache

like image 41
Waqas Mustafa Avatar answered Nov 07 '25 16:11

Waqas Mustafa