bah, never mind, i guess its because that being deferred, none of the provided classes are loading so the boot isnt loading ?
Sep 5, 2019
6
Level 7
Custom service provider boot method not running
I have an observer and the docs state You may register observers in the boot method of one of your service providers.
So in my custom provider
class DraftServiceProvider extends ServiceProvider implements DeferrableProvider
{
public function boot() {
Options::observe(OptionsObserver::class);
}
The provider is registered in the app.php, and I know it works as it loads some other singletons that are working as I expect.
However, the observer above does not work.
If i put this observer registration in the AppServiceProvider::boot method, it does work as expected.
I would like to keep it in my custom provider though, as its a DeferrableProvider - could this be the issue ? Does that not execute a boot method ?
Thanks
Please or to participate in this conversation.