mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 18:24:03 +00:00
Update tenant-manager.blade.md
This commit is contained in:
parent
5df0dac047
commit
47cd871155
1 changed files with 6 additions and 5 deletions
|
|
@ -11,7 +11,7 @@ This page documents a couple of `TenantManager` methods you may find useful.
|
|||
|
||||
To call methods on `TenantManager`, you may use the `tenancy()` helper or the `Tenancy` facade.
|
||||
|
||||
### Finding tenant using id
|
||||
### Find tenant by id
|
||||
|
||||
```php
|
||||
>>> \Tenancy::find('b07aa3b0-dc68-11e9-9352-9159b2055c42')
|
||||
|
|
@ -26,9 +26,8 @@ To call methods on `TenantManager`, you may use the `tenancy()` helper or the `T
|
|||
}
|
||||
```
|
||||
|
||||
### Finding tenant by domain
|
||||
### Find tenant by domain
|
||||
|
||||
You may use the second argument to specify the key(s) as a string/array.
|
||||
|
||||
```php
|
||||
>>> tenancy()->findByDomain('bar.localhost')
|
||||
|
|
@ -112,11 +111,13 @@ This method returns a collection of arrays.
|
|||
=> true
|
||||
```
|
||||
|
||||
This doesn't delete the tenant's database. If you want to delete it, save the database name prior to deleting the tenant. You can get the database name using `getDatabaseName()`
|
||||
NOTE: This doesn't delete the tenant's database.
|
||||
|
||||
If you want to delete it, get the database name prior to deleting the tenant using `getDatabaseName()`.
|
||||
|
||||
```php
|
||||
>>> $tenant->getDatabaseName()
|
||||
=> "tenant67412a60-1c01-11e9-a9e9-f799baa56fd9"
|
||||
```
|
||||
|
||||
If you want tenant databases to be deleted automatically, you may use the [`delete_database_after_tenant_deletion` configuration]({{ $page->link('configuration#delete-database-after-tenant-deletion') }})
|
||||
If you want tenant databases to be deleted automatically, you may use the [`delete_database_after_tenant_deletion` configuration]({{ $page->link('configuration#delete-database-after-tenant-deletion') }})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue