mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 04:04:04 +00:00
canCreate database
This commit is contained in:
parent
08319695b9
commit
de54b5708c
7 changed files with 60 additions and 7 deletions
23
src/Exceptions/TenantDatabaseAlreadyExistsException.php
Normal file
23
src/Exceptions/TenantDatabaseAlreadyExistsException.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Exceptions;
|
||||
|
||||
use Stancl\Tenancy\Contracts\TenantCannotBeCreatedException;
|
||||
|
||||
class TenantDatabaseAlreadyExistsException extends TenantCannotBeCreatedException
|
||||
{
|
||||
/** @var string */
|
||||
protected $database;
|
||||
|
||||
public function reason(): string
|
||||
{
|
||||
return "Database {$this->database} already exists.";
|
||||
}
|
||||
|
||||
public function __construct(string $database)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
$this->database = $database;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue