From d03c0af95efb27373c361900523df29b2f13fc8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 23 Apr 2020 20:12:05 +0200 Subject: [PATCH] Fix #367, make seeder respect --force --- src/Commands/Seed.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Commands/Seed.php b/src/Commands/Seed.php index 8042e8dc5..36f59dd0a 100644 --- a/src/Commands/Seed.php +++ b/src/Commands/Seed.php @@ -43,6 +43,12 @@ public function __construct(ConnectionResolverInterface $resolver, DatabaseManag */ public function handle() { + foreach (config('tenancy.seeder_parameters') as $parameter => $value) { + if (! $this->input->hasParameterOption($parameter)) { + $this->input->setOption(ltrim($parameter, '-'), $value); + } + } + if (! $this->confirmToProceed()) { return; } @@ -52,12 +58,6 @@ public function handle() $this->input->setOption('database', $tenant->getConnectionName()); - foreach (config('tenancy.seeder_parameters') as $parameter => $value) { - if (! $this->input->hasParameterOption($parameter)) { - $this->input->setOption(ltrim($parameter, '-'), $value); - } - } - $tenant->run(function () { // Seed parent::handle();