You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default SwitchTenantDatabaseTask instantiates the 'db' app container too early causing other extensions to 'db' that are properly being registered to break if loaded afterwards.
app('db')->extend($tenantConnectionName, function ($config, $name) use ($databaseName) {
$config['database'] = $databaseName;
return app('db.factory')->make($config, $name);
});
The default SwitchTenantDatabaseTask instantiates the 'db' app container too early causing other extensions to 'db' that are properly being registered to break if loaded afterwards.
The issue is honestly better described here:
mongodb/laravel-mongodb#2715 (comment)
To fix this code, we should call it in a 'resolving' call.
The text was updated successfully, but these errors were encountered: