mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
521 B
521 B
| title | description | extends | section |
|---|---|---|---|
| Custom Database Names | Custom Database Names.. | _layouts.documentation_v2 | content |
Custom Database Names
To set a specific database name for a tenant, set the _tenancy_db_name key in the tenant's storage.
You should do this during the tenant creation process, to make sure the right database name is used during database creation.
use Stancl\Tenancy\Tenant;
Tenant::create('example.com', [
'_tenancy_db_name' => 'example_com'
])