-
-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broken setupDriverConfig #23
Comments
Can you check against. crynobone/todoist@master...single-database |
I saw the commit code aside from the user observer (I'm using other logic) everything is the same and the array has 'container' as the key instead of 'tenants' which causes it to break. Sorry if cannot test apple to apple. |
|
$this->config will have $this->config['container'] |
oh sorry it is $this->config['connection']
|
|
ok seems that the problem is registerConfigurationForManager is called after the app boot method so the database driver is not registered yet. is there a way to call it before boot? |
It is not safe to set it before boot, |
is it safe to redirect after register() coz I'm using this to switch database based on detected domain not user |
That should use/set as a middleware, not service provider. |
ok thanks for the information |
I'm not sure if this will affect normal installation of tenanti since I'm using it in more complex way than the standard behavior. But judging from the code in the TenantiManager::connection
the array set for the $this->config will never have driver key thus when TenantiSetupDriverConfig is called it will always return null
When changed to :
it will work again as expected.
not sure if this is a bug or just my installation that need this, so I didnt make proper fork and pull request.
Thank you for the great plugin btw
The text was updated successfully, but these errors were encountered: