commitm / multi-tenant
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=8.3
- doctrine/orm: ^3.1.1
- symfony/framework-bundle: 7.0.*
This package is auto-updated.
Last update: 2025-06-06 00:26:15 UTC
README
simplify to configure multitenant bundle
Deployment
To deploy this project run
in packages/multi_tenant.yaml
add:
multi_tenant: tenants: company_id: entity: App\Entity\Company aware: App\Entity\Interfaces\TenantAwares\CompanyAware property: company
company_id
name tenant
entity
entity name to limited others entities or automatically set tenant
aware
to following entities what you want and limited results
Aware interface have to implements
CommitM\MultiTenant\Multitenancy\TenantAware
property
name property tenant
CommitM\MultiTenant\Multitenancy\Provider\TenantsProvider
service to manage tenants
you can use like that:
$tenantsProvider->getTenantByClass(Company::class)->setEntity($this->company);
if tenant is set, you don't need remember using setter with tenant's entity $product = new Product(): $product->setCompany(); // this will be set automatically