1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 04:04:04 +00:00

canCreate database

This commit is contained in:
Samuel Štancl 2019-09-08 16:52:10 +02:00
parent 08319695b9
commit de54b5708c
7 changed files with 60 additions and 7 deletions

View 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;
}
}