mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 16:44:04 +00:00
Fix withTenantDatabases()
This commit is contained in:
parent
8f5e12a202
commit
fc14e6dbf6
1 changed files with 2 additions and 2 deletions
|
|
@ -16,8 +16,8 @@ uses(TestCase::class)->in(__DIR__);
|
|||
function withTenantDatabases(bool $migrate = false)
|
||||
{
|
||||
Event::listen(TenantCreated::class, JobPipeline::make($migrate
|
||||
? [CreateDatabase::class]
|
||||
: [CreateDatabase::class, MigrateDatabase::class]
|
||||
? [CreateDatabase::class, MigrateDatabase::class]
|
||||
: [CreateDatabase::class]
|
||||
)->send(function (TenantCreated $event) {
|
||||
return $event->tenant;
|
||||
})->toListener());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue