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:
parent
c7c1736a12
commit
bc9194c694
2 changed files with 48 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue