From 3575e0dcdfad97bc680beb8f583fa2ee93ca7fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 21 Oct 2019 20:51:31 +0200 Subject: [PATCH] postCreationActions --- src/TenantManager.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/TenantManager.php b/src/TenantManager.php index 8e672012..4a671551 100644 --- a/src/TenantManager.php +++ b/src/TenantManager.php @@ -87,7 +87,7 @@ class TenantManager }; } - $afterCreating = array_merge($afterCreating, $this->getUserPostCreationCallbacks()); + $afterCreating = array_merge($afterCreating, $this->getUserPostCreationActions()); $this->database->createDatabase($tenant, $afterCreating); @@ -337,10 +337,15 @@ class TenantManager return $this->shouldMigrateAfterCreation() && $this->app['config']['tenancy.seed_after_migration'] ?? false; } - /** @return callable[] */ - public function getUserPostCreationCallbacks(): array + /** + * A user-specified list of callbacks or jobs executed after + * creating, migrating, and seeding the tenant database. + * + * @return \Illuminate\Contracts\Queue\ShouldQueue[]|callable[] + */ + public function getUserPostCreationActions(): array { - return $this->app['tenancy.postCreationCallbacks'] ?? []; + return $this->app['tenancy.postCreationActions'] ?? []; } public function databaseCreationQueued(): bool