Skip to content

Commit 3ff7d99

Browse files
authored
Merge pull request #8560 from ProcessMaker/feature/FOUR-27177
Add json support for tenants:list
2 parents 6659ce0 + a3bc22d commit 3ff7d99

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

ProcessMaker/Console/Commands/TenantsCreate.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ public function handle()
198198
$this->line('- Run migrations and seed the database');
199199
$this->line('- Run the install command for each package');
200200
$this->line('- Run artisan upgrade');
201-
$this->line('- Install passport by calling passport:install');
201+
$this->line('- Install passport by calling passport:install (create the default clients');
202+
$this->line('- Reset the admin password with auth:set-password');
203+
$this->line('- Run processmaker:initialize-script-microservice');
202204
$this->info("For example, `TENANT={$tenant->id} php artisan migrate:fresh --seed`");
203205
}
204206
}

ProcessMaker/Console/Commands/TenantsList.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class TenantsList extends Command
1515
*
1616
* @var string
1717
*/
18-
protected $signature = 'tenants:list {--ids : Only output the ids}';
18+
protected $signature = 'tenants:list {--ids : Only output the ids} {--json : Output the tenants as JSON}';
1919

2020
/**
2121
* The console command description.
@@ -40,6 +40,12 @@ public function handle()
4040
return;
4141
}
4242

43+
if ($this->option('json')) {
44+
$this->line(json_encode($tenants->toArray(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
45+
46+
return;
47+
}
48+
4349
$formattedTenants = $tenants->map(function ($tenant) {
4450
$config = $tenant->config;
4551

0 commit comments

Comments
 (0)