From bad6ea4641c4d52edcadfd9876c4fa03e0983ca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= <33033094+stancl@users.noreply.github.com> Date: Sat, 19 Jan 2019 17:02:38 +0100 Subject: [PATCH] Add a note on deleting tenant databases --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index d99e4b08..935c5864 100644 --- a/README.md +++ b/README.md @@ -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.