Skip to content
Discussion options

You must be logged in to vote

Hi @AnthonyEdmonds!

This is because Laravel's service provider register() method should only be used to bind things into the service container:

https://laravel.com/docs/9.x/providers#the-register-method

When Laravel calls the register() method in a service provider, it is not guaranteed that all of the other application service providers have in-fact registered. Meaning that the configuration, eloquent, authentication, and other service provides may not be ready to be used. LdapRecord-Laravel uses these services when registering connections (requiring the Configuration service provider to be loaded).

Here is an example of Laravel Cashier performing the same order of operations:

https://gi…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AnthonyEdmonds
Comment options

@stevebauman
Comment options

Answer selected by AnthonyEdmonds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants