mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
Use correct DB connection in seed command
This commit is contained in:
parent
ede2dc23c6
commit
709e295048
1 changed files with 2 additions and 2 deletions
|
|
@ -47,11 +47,11 @@ class Seed extends SeedCommand
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->input->setOption('database', 'tenant');
|
|
||||||
|
|
||||||
$originalTenant = tenancy()->getTenant();
|
$originalTenant = tenancy()->getTenant();
|
||||||
tenancy()->all($this->option('tenants'))->each(function ($tenant) {
|
tenancy()->all($this->option('tenants'))->each(function ($tenant) {
|
||||||
$this->line("Tenant: {$tenant['id']}");
|
$this->line("Tenant: {$tenant['id']}");
|
||||||
|
|
||||||
|
$this->input->setOption('database', $tenant->getDatabaseName());
|
||||||
tenancy()->initialize($tenant);
|
tenancy()->initialize($tenant);
|
||||||
|
|
||||||
// Seed
|
// Seed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue