1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 07:54:03 +00:00

Use getTenants()

This commit is contained in:
lukinovec 2023-01-06 08:00:16 +01:00
parent 1765761860
commit cda2a57fb0

View file

@ -47,9 +47,9 @@ class Migrate extends MigrateCommand
return 1; return 1;
} }
foreach ($this->option('tenants') as $tenant) { foreach ($this->getTenants() as $tenant) {
try { try {
tenancy()->find($tenant)->run(function ($tenant) { $tenant->run(function ($tenant) {
$this->line("Tenant: {$tenant->getTenantKey()}"); $this->line("Tenant: {$tenant->getTenantKey()}");
event(new MigratingDatabase($tenant)); event(new MigratingDatabase($tenant));