1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-06 16:54:04 +00:00

create host connection for creating, deleting tenants

This commit is contained in:
Abrar Ahmad 2022-09-13 14:41:28 +05:00
parent abd17f83a1
commit cd6e989c09
7 changed files with 201 additions and 8 deletions

View file

@ -88,7 +88,7 @@ class DatabaseManager
*/
public function ensureTenantCanBeCreated(TenantWithDatabase $tenant): void
{
$manager = $tenant->database()->manager();
$manager = $tenant->database()->hostManager();
if ($manager->databaseExists($database = $tenant->database()->getName())) {
throw new Exceptions\TenantDatabaseAlreadyExistsException($database);