mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:44:04 +00:00
Fix #71
This commit is contained in:
parent
ae5527c9a9
commit
a3f37b7f77
7 changed files with 78 additions and 6 deletions
|
|
@ -2,10 +2,8 @@
|
|||
|
||||
namespace Stancl\Tenancy\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Stancl\Tenancy\DatabaseManager;
|
||||
use Stancl\Tenancy\Traits\HasATenantsOption;
|
||||
use Illuminate\Database\Migrations\Migrator;
|
||||
use Illuminate\Database\Console\Seeds\SeedCommand;
|
||||
use Illuminate\Database\ConnectionResolverInterface;
|
||||
|
||||
|
|
@ -56,5 +54,11 @@ class Seed extends SeedCommand
|
|||
// Seed
|
||||
parent::handle();
|
||||
});
|
||||
|
||||
if (tenancy()->initialized) {
|
||||
tenancy()->switchDatabaseConnection();
|
||||
} else {
|
||||
$this->database->disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue