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

Set $persisted in TenantManager::createTenant() (#272)

* Set $persisted in TenantManager::createTenant()

* Apply fixes from StyleCI
This commit is contained in:
Samuel Štancl 2020-01-19 12:08:16 +01:00 committed by GitHub
parent 5ebb68e860
commit 6ad1a6639f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -33,7 +33,7 @@ class Install extends Command
$this->callSilent('vendor:publish', [ $this->callSilent('vendor:publish', [
'--provider' => 'Stancl\Tenancy\TenancyServiceProvider', '--provider' => 'Stancl\Tenancy\TenancyServiceProvider',
'--tag' => 'config', '--tag' => 'config',
]); ]);
$this->info('✔️ Created config/tenancy.php'); $this->info('✔️ Created config/tenancy.php');
$newKernel = str_replace( $newKernel = str_replace(

View file

@ -41,7 +41,7 @@ class Tenant implements ArrayAccess
/** @var Repository */ /** @var Repository */
protected $config; protected $config;
/** @var StorageDriver */ /** @var StorageDriver|CanDeleteKeys */
protected $storage; protected $storage;
/** @var TenantManager */ /** @var TenantManager */
@ -233,8 +233,6 @@ class Tenant implements ArrayAccess
$this->manager->createTenant($this); $this->manager->createTenant($this);
} }
$this->persisted = true;
return $this; return $this;
} }

View file

@ -73,6 +73,8 @@ class TenantManager
$this->storage->createTenant($tenant); $this->storage->createTenant($tenant);
$tenant->persisted = true;
/** @var \Illuminate\Contracts\Queue\ShouldQueue[]|callable[] $afterCreating */ /** @var \Illuminate\Contracts\Queue\ShouldQueue[]|callable[] $afterCreating */
$afterCreating = []; $afterCreating = [];