Shared and Multi Database Tenants
final readonly class EcotoneConfiguration
{
#[ServiceContext]
public function multiTenantConfiguration(): MultiTenantConfiguration
{
return MultiTenantConfiguration::createWithDefaultConnection(
tenantHeaderName: 'tenant',
tenantToConnectionMapping: [
'tenant_a' => 'tenant_a_connection',
'tenant_b' => 'tenant_b_connection'
],
// Provide default connection
'tenant_default_connection'
);
}
}Last updated
Was this helpful?