mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 01:14:03 +00:00
Respect custom columns during tenant creation (#191)
This commit is contained in:
parent
479df83027
commit
f489aba819
3 changed files with 51 additions and 5 deletions
|
|
@ -103,7 +103,9 @@ class DatabaseStorageDriver implements StorageDriver
|
|||
public function createTenant(Tenant $tenant): void
|
||||
{
|
||||
$this->centralDatabase->transaction(function () use ($tenant) {
|
||||
Tenants::create(['id' => $tenant->id, 'data' => json_encode($tenant->data)])->toArray();
|
||||
Tenants::create(array_merge(Tenants::encodeData($tenant->data), [
|
||||
'id' => $tenant->id,
|
||||
]))->toArray();
|
||||
|
||||
$domainData = [];
|
||||
foreach ($tenant->domains as $domain) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue