Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed May 18, 2020
1 parent 27ad57e commit eef0750
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 3 additions & 7 deletions src/Commands/TenantsArtisanCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit eef0750

Please sign in to comment.