mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 23:54:04 +00:00
ensureTenantCanBeCreated test
This commit is contained in:
parent
65b2c6ceee
commit
8beaaaeda7
2 changed files with 16 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ namespace Stancl\Tenancy\StorageDrivers\Database;
|
|||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Stancl\Tenancy\Contracts\StorageDriver;
|
||||
use Stancl\Tenancy\Exceptions\DomainOccupiedByOtherTenantException;
|
||||
use Stancl\Tenancy\Exceptions\DomainsOccupiedByOtherTenantException;
|
||||
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
|
||||
use Stancl\Tenancy\Exceptions\TenantWithThisIdAlreadyExistsException;
|
||||
use Stancl\Tenancy\StorageDrivers\Database\DomainModel as Domains;
|
||||
|
|
@ -60,7 +60,7 @@ class DatabaseStorageDriver implements StorageDriver
|
|||
}
|
||||
|
||||
if (Domains::whereIn('domain', $tenant->domains)->exists()) {
|
||||
throw new DomainOccupiedByOtherTenantException();
|
||||
throw new DomainsOccupiedByOtherTenantException;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue