1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 12:54:05 +00:00

Add a note on deleting tenant databases

This commit is contained in:
Samuel Štancl 2019-01-19 17:02:38 +01:00 committed by GitHub
parent 61ae0c1921
commit bad6ea4641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -283,6 +283,13 @@ tenant('uuid'); // Does the same thing as tenant()->tenant['uuid']
=> true
```
Note that deleting a tenant doesn't delete his database. You can do this manually, though. To get the database name of a tenant, you can do use the `TenantManager::getDatabaseName()` method.
```php
>>> tenant()->getDatabaseName(tenant()->findByDomain('laravel.localhost'))
=> "tenant67412a60-1c01-11e9-a9e9-f799baa56fd9"
```
## Storage driver
Currently, only Redis is supported, but you're free to code your own storage driver which follows the `Stancl\Tenancy\Interfaces\StorageDriver` interface. Just point the `tenancy.storage_driver` setting at your driver.