Laravel 5.2 Service provider not booting

…衆ロ難τιáo~ 提交于 2019-11-30 12:35:14

Got an answer on another forum from rodrigo.pedra:

php artisan config:clear
php artisan clear-compiled

The first will clear any cached config files, and the later will clear the services cache

You said you tried php artisan clear-compiled and composer dump-autoload but have you tried running all those commands?

php artisan clear-compiled 
composer dump-autoload
php artisan optimize

I had a weird issue as well: with deferred providers, until I saw this

To defer the loading of a provider, set the defer property to true and define a provides method. The provides method returns the service container bindings that the provider registers:

Laravel Documentation

In case your ServiceProvider class implements the boot() method, make sure you're invoking the parent::boot() method as well.

At least in my case (Laravel 5.3.6) the missing parent::boot() has prevented the service provider from booting properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!