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

Fix chained jobs

This commit is contained in:
Samuel Štancl 2019-10-25 18:19:00 +02:00
parent 4196d918d6
commit 9671e1e29d

View file

@ -161,11 +161,15 @@ class DatabaseManager
} }
} }
QueuedTenantDatabaseCreator::withChain($afterCreating)->dispatch($manager, $database); QueuedTenantDatabaseCreator::withChain($chain)->dispatch($manager, $database);
} else { } else {
$manager->createDatabase($database); $manager->createDatabase($database);
foreach ($afterCreating as $callback) { foreach ($afterCreating as $item) {
$callback($tenant); if (is_object($item)) {
$item->handle($tenant);
} else {
$item($tenant);
}
} }
} }
} }