mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-13 04:44:03 +00:00
Model timestamps
This commit is contained in:
parent
4b5554dcac
commit
6b103cd2cb
6 changed files with 10 additions and 6 deletions
|
|
@ -5,6 +5,7 @@ declare(strict_types=1);
|
|||
namespace Stancl\Tenancy\StorageDrivers\Database;
|
||||
|
||||
use Illuminate\Foundation\Application;
|
||||
use Illuminate\Support\Carbon;
|
||||
use Stancl\Tenancy\Contracts\StorageDriver;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
use Stancl\Tenancy\Exceptions\DomainsOccupiedByOtherTenantException;
|
||||
|
|
@ -84,9 +85,10 @@ class DatabaseStorageDriver implements StorageDriver
|
|||
|
||||
$domainData = [];
|
||||
foreach ($tenant->domains as $domain) {
|
||||
$domainData[] = ['domain' => $domain, 'tenant_id' => $tenant->id];
|
||||
$domainData[] = ['domain' => $domain, 'tenant_id' => $tenant->id, 'created_at' => Carbon::now()];
|
||||
}
|
||||
Domains::create($domainData);
|
||||
|
||||
Domains::insert($domainData);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue