mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
3.x redesign
This commit is contained in:
parent
857122540f
commit
f8f354c323
229 changed files with 201175 additions and 22440 deletions
20
source/docs/v2/custom-database-names.blade.md
Normal file
20
source/docs/v2/custom-database-names.blade.md
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
title: Custom Database Names
|
||||
description: Custom Database Names..
|
||||
extends: _layouts.documentation
|
||||
section: content
|
||||
---
|
||||
|
||||
# Custom Database Names {#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.
|
||||
|
||||
```php
|
||||
use Stancl\Tenancy\Tenant;
|
||||
|
||||
Tenant::create('example.com', [
|
||||
'_tenancy_db_name' => 'example_com'
|
||||
])
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue