mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 17:24:03 +00:00
Rolling back & deleting DB events
This commit is contained in:
parent
2839f45196
commit
78c64f0425
4 changed files with 24 additions and 0 deletions
|
|
@ -11,6 +11,7 @@ use Illuminate\Queue\InteractsWithQueue;
|
|||
use Illuminate\Queue\SerializesModels;
|
||||
use Stancl\Tenancy\Database\Models\Tenant;
|
||||
use Stancl\Tenancy\Events\DatabaseDeleted;
|
||||
use Stancl\Tenancy\Events\DeletingDatabase;
|
||||
|
||||
class DeleteDatabase implements ShouldQueue
|
||||
{
|
||||
|
|
@ -26,6 +27,8 @@ class DeleteDatabase implements ShouldQueue
|
|||
|
||||
public function handle()
|
||||
{
|
||||
event(new DeletingDatabase($this->tenant));
|
||||
|
||||
$this->tenant->database()->manager()->deleteDatabase($this->tenant);
|
||||
|
||||
event(new DatabaseDeleted($this->tenant));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue