mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 02:04:03 +00:00
misc improvements - stronger types, exception refactor
This commit is contained in:
parent
ddc7cf49c3
commit
55d0a9ab87
34 changed files with 179 additions and 209 deletions
18
src/Exceptions/TenantCouldNotBeIdentifiedByIdException.php
Normal file
18
src/Exceptions/TenantCouldNotBeIdentifiedByIdException.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Exceptions;
|
||||
|
||||
use Stancl\Tenancy\Contracts\TenantCouldNotBeIdentifiedException;
|
||||
|
||||
class TenantCouldNotBeIdentifiedByIdException extends TenantCouldNotBeIdentifiedException
|
||||
{
|
||||
public function __construct(int|string $tenant_id)
|
||||
{
|
||||
$this
|
||||
->tenantCouldNotBeIdentified("by tenant id: $tenant_id")
|
||||
->title('Tenant could not be identified with that ID')
|
||||
->description('Are you sure the ID is correct and the tenant exists?');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue