mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 12:54:05 +00:00
Add support for soft delete events
This commit is contained in:
parent
54a33f93a8
commit
d71fec7d27
5 changed files with 33 additions and 0 deletions
|
|
@ -48,6 +48,9 @@ class TenancyServiceProvider extends ServiceProvider
|
|||
return $event->tenant;
|
||||
})->shouldBeQueued(false), // `false` by default, but you probably want to make this `true` for production.
|
||||
],
|
||||
Events\TenantRestoring::class => [],
|
||||
Events\TenantRestored::class => [],
|
||||
Events\TenantForceDeleted::class => [],
|
||||
|
||||
// Domain events
|
||||
Events\CreatingDomain::class => [],
|
||||
|
|
|
|||
|
|
@ -56,5 +56,8 @@ class Tenant extends Model implements Contracts\Tenant
|
|||
'updated' => Events\TenantUpdated::class,
|
||||
'deleting' => Events\DeletingTenant::class,
|
||||
'deleted' => Events\TenantDeleted::class,
|
||||
'restoring' => Events\TenantRestoring::class,
|
||||
'restored' => Events\TenantRestored::class,
|
||||
'forceDeleted' => Events\TenantForceDeleted::class,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
9
src/Events/TenantForceDeleted.php
Normal file
9
src/Events/TenantForceDeleted.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Events;
|
||||
|
||||
class TenantForceDeleted extends Contracts\TenantEvent
|
||||
{
|
||||
}
|
||||
9
src/Events/TenantRestored.php
Normal file
9
src/Events/TenantRestored.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Events;
|
||||
|
||||
class TenantRestored extends Contracts\TenantEvent
|
||||
{
|
||||
}
|
||||
9
src/Events/TenantRestoring.php
Normal file
9
src/Events/TenantRestoring.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Stancl\Tenancy\Events;
|
||||
|
||||
class TenantRestoring extends Contracts\TenantEvent
|
||||
{
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue