mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 11:14:03 +00:00
postCreationActions
This commit is contained in:
parent
394d976863
commit
3575e0dcdf
1 changed files with 9 additions and 4 deletions
|
|
@ -87,7 +87,7 @@ class TenantManager
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$afterCreating = array_merge($afterCreating, $this->getUserPostCreationCallbacks());
|
$afterCreating = array_merge($afterCreating, $this->getUserPostCreationActions());
|
||||||
|
|
||||||
$this->database->createDatabase($tenant, $afterCreating);
|
$this->database->createDatabase($tenant, $afterCreating);
|
||||||
|
|
||||||
|
|
@ -337,10 +337,15 @@ class TenantManager
|
||||||
return $this->shouldMigrateAfterCreation() && $this->app['config']['tenancy.seed_after_migration'] ?? false;
|
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
|
public function databaseCreationQueued(): bool
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue