1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravelのサービスプロバイダのキャッシュについてのエラー

Posted at

作成したサービスプロバイダを削除した際にエラーが出る。

###状況
FormComponentServiceProviderというサービスプロバイダを作成し、config/app.phpへ追加した後、不要になったため削除。

下記エラーが出る。


In ProviderRepository.php line 208:

  Class 'App\Providers\FormComponentServiceProvider' not found

config/app.phpでの定義を削除し、キャッシュクリアしてみるが同様のエラーが出る。

$ php artisan config:cache

In Application.php line 670:

  Class 'App\Providers\FormComponentServiceProvider' not found

###原因・対処
bootstrap/cache/にキャッシュが残っていたため。

それらを削除し、composer dump-autoloadを行うことで解決。

1
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?