diff --git a/src/TenantManager.php b/src/TenantManager.php index 07439661..18ccc9f1 100644 --- a/src/TenantManager.php +++ b/src/TenantManager.php @@ -275,7 +275,7 @@ class TenantManager */ public function put($key, $value = null, string $uuid = null) { - if (in_array($key, ['uuid', 'domain'], true) || + if (in_array($key, ['uuid', 'domain'], true) || (is_array($key) && array_reduce(array_keys($key), function ($result, $k) { return $result || in_array($k, ['uuid', 'domain']); }, false)) diff --git a/tests/TenantManagerTest.php b/tests/TenantManagerTest.php index a9a775c5..453730ea 100644 --- a/tests/TenantManagerTest.php +++ b/tests/TenantManagerTest.php @@ -216,7 +216,7 @@ class TenantManagerTest extends TestCase config(['tenancy.database_name_key' => '_stancl_tenancy_database_name']); $tenant = tenant()->create('foo.localhost', [ - '_stancl_tenancy_database_name' => $database + '_stancl_tenancy_database_name' => $database, ]); $this->assertSame($database, tenant()->getDatabaseName($tenant));