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

Merge branch 'master' of github.com:stancl/tenancy

This commit is contained in:
Samuel Štancl 2019-09-08 15:07:16 +02:00
commit af5b7e8558
2 changed files with 6 additions and 4 deletions

View file

@ -1,10 +1,12 @@
<?php <?php
declare(strict_types=1);
namespace Stancl\Tenancy\Contracts; namespace Stancl\Tenancy\Contracts;
abstract class TenantCannotBeCreatedException extends \Exception abstract class TenantCannotBeCreatedException extends \Exception
{ {
abstract function reason(): string; abstract public function reason(): string;
private $message; private $message;
@ -12,4 +14,4 @@ abstract class TenantCannotBeCreatedException extends \Exception
{ {
$this->message = 'Tenant cannot be craeted. Reason: ' . $this->reason(); $this->message = 'Tenant cannot be craeted. Reason: ' . $this->reason();
} }
} }

View file

@ -6,8 +6,8 @@ namespace Stancl\Tenancy;
use Illuminate\Foundation\Application; use Illuminate\Foundation\Application;
use Illuminate\Contracts\Console\Kernel as Artisan; use Illuminate\Contracts\Console\Kernel as Artisan;
use Stancl\Tenancy\Contracts\TenantCannotBeCreatedException;
use Stancl\Tenancy\Exceptions\NoTenantIdentifiedException; use Stancl\Tenancy\Exceptions\NoTenantIdentifiedException;
use Stancl\Tenancy\Contracts\TenantCannotBeCreatedException;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException; use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
/** /**
@ -50,7 +50,7 @@ class TenantManagerv2
$this->storage->createTenant($tenant); $this->storage->createTenant($tenant);
$this->database->create($tenant); $this->database->create($tenant);
if ($this->migrateAfterCreation()) { if ($this->migrateAfterCreation()) {
$this->artisan->call('tenants:migrate', [ $this->artisan->call('tenants:migrate', [
'--tenants' => [$tenant['id']], '--tenants' => [$tenant['id']],