From eef07501ae7abdf74d394d6c59591881606cd7c4 Mon Sep 17 00:00:00 2001 From: freek Date: Mon, 18 May 2020 10:58:04 +0200 Subject: [PATCH] wip --- CHANGELOG.md | 5 +++++ src/Commands/TenantsArtisanCommand.php | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d39057..bcab9d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `laravel-multitenancy` will be documented in this file +## 1.1.0 - 2020-02-18 + +- fix published migration name +- ask for artisan command if none is given + ## 1.0.0 - 2020-05-16 - initial release diff --git a/src/Commands/TenantsArtisanCommand.php b/src/Commands/TenantsArtisanCommand.php index f0c7580..afe8b58 100644 --- a/src/Commands/TenantsArtisanCommand.php +++ b/src/Commands/TenantsArtisanCommand.php @@ -15,15 +15,11 @@ public function handle() { $tenantQuery = Tenant::query(); - if (!$artisanCommand = $this->argument('artisanCommand')) { - $artisanCommand = $this->ask('Command to run?'); + if (! $artisanCommand = $this->argument('artisanCommand')) { + $artisanCommand = $this->ask('Which artisan command do you want to run for all tenants?'); } - if (!$tenantIds = $this->option('tenant')) { - $tenantIds = $this->ask('What tenant ID? Nothing for all tenants.'); - } - - if ($tenantIds) { + if ($tenantIds = $this->option('tenant')) { $tenantQuery->whereIn('id', Arr::wrap($tenantIds)); }