mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 16:14:02 +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;
|
||||
}
|
||||
|
||||
$this->input->setOption('database', 'tenant');
|
||||
|
||||
$originalTenant = tenancy()->getTenant();
|
||||
tenancy()->all($this->option('tenants'))->each(function ($tenant) {
|
||||
$this->line("Tenant: {$tenant['id']}");
|
||||
|
||||
$this->input->setOption('database', $tenant->getDatabaseName());
|
||||
tenancy()->initialize($tenant);
|
||||
|
||||
// Seed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue