mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 02:54:05 +00:00
Merge branch 'master' of github.com:stancl/tenancy
This commit is contained in:
commit
27ded685f8
3 changed files with 7 additions and 2 deletions
|
|
@ -6,7 +6,7 @@ namespace Stancl\Tenancy\Exceptions;
|
||||||
|
|
||||||
use Stancl\Tenancy\Contracts\TenantCannotBeCreatedException;
|
use Stancl\Tenancy\Contracts\TenantCannotBeCreatedException;
|
||||||
|
|
||||||
class DomainOccupiedByOtherTenantException extends TenantCannotBeCreatedException
|
class DomainsOccupiedByOtherTenantException extends TenantCannotBeCreatedException
|
||||||
{
|
{
|
||||||
public function reason(): string
|
public function reason(): string
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Stancl\Tenancy\Exceptions;
|
namespace Stancl\Tenancy\Exceptions;
|
||||||
|
|
||||||
class TenantStorageException extends \Exception
|
class TenantStorageException extends \Exception
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -118,12 +118,14 @@ class DatabaseStorageDriver implements StorageDriver
|
||||||
public function get(string $key, Tenant $tenant = null)
|
public function get(string $key, Tenant $tenant = null)
|
||||||
{
|
{
|
||||||
$tenant = $tenant ?? $this->tenant();
|
$tenant = $tenant ?? $this->tenant();
|
||||||
|
|
||||||
return Tenants::find($tenant->id)->get($key);
|
return Tenants::find($tenant->id)->get($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMany(array $keys, Tenant $tenant = null): array
|
public function getMany(array $keys, Tenant $tenant = null): array
|
||||||
{
|
{
|
||||||
$tenant = $tenant ?? $this->tenant();
|
$tenant = $tenant ?? $this->tenant();
|
||||||
|
|
||||||
return Tenants::find($tenant->id)->getMany($keys);
|
return Tenants::find($tenant->id)->getMany($keys);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue