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

Added DeleteDomain Job while deleting tenant.

This commit is contained in:
Abrar Ahmad 2022-07-04 12:29:22 +05:00
parent c7c1736a12
commit bc9194c694
2 changed files with 48 additions and 1 deletions

View file

@ -40,7 +40,13 @@ class TenancyServiceProvider extends ServiceProvider
Events\TenantSaved::class => [],
Events\UpdatingTenant::class => [],
Events\TenantUpdated::class => [],
Events\DeletingTenant::class => [],
Events\DeletingTenant::class => [
JobPipeline::make([
Jobs\DeleteDomain::class,
])->send(function (Events\TenantDeleted $event) {
return $event->tenant;
})->shouldBeQueued(false), // `false` by default, but you probably want to make this `true` for production.
],
Events\TenantDeleted::class => [
JobPipeline::make([
Jobs\DeleteDatabase::class,