diff --git a/src/Commands/Down.php b/src/Commands/Down.php new file mode 100644 index 00000000..ec21a340 --- /dev/null +++ b/src/Commands/Down.php @@ -0,0 +1,52 @@ +runForMultiple($this->option('tenants'), function ($tenant) { + $this->line("Tenant: {$tenant['id']}"); + $tenant->putDownForMaintenance([ + 'time' => $this->option('time'), + 'message' => $this->option('message'), + 'retry' => $this->option('retry'), + 'allowed' => $this->option('allowed'), + ]); + }); + + $this->comment('Tenants are now in maintenance mode.'); + } +} diff --git a/src/Commands/Up.php b/src/Commands/Up.php new file mode 100644 index 00000000..c47bdb7f --- /dev/null +++ b/src/Commands/Up.php @@ -0,0 +1,43 @@ +runForMultiple($this->option('tenants'), function ($tenant) { + $this->line("Tenant: {$tenant['id']}"); + $tenant->bringUpFromMaintenance(); + }); + + $this->comment('Tenants are now out of maintenance mode.'); + } +}