mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 01:44:04 +00:00
updateTenant DB storage driver
This commit is contained in:
parent
3b72a97527
commit
1f88a1ff94
2 changed files with 8 additions and 2 deletions
|
|
@ -85,7 +85,12 @@ class DatabaseStorageDriver implements StorageDriver
|
|||
public function updateTenant(Tenant $tenant): void
|
||||
{
|
||||
Tenants::find($tenant->id)->putMany($tenant->data);
|
||||
// todo1 update domains
|
||||
Domains::firstOrCreate(array_map(function ($domain) use ($tenant) {
|
||||
return [
|
||||
'tenant_id' => $tenant->id,
|
||||
'domain' => $domain,
|
||||
];
|
||||
}, $tenant->domains));
|
||||
}
|
||||
|
||||
public function deleteTenant(Tenant $tenant): void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue