mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 09:04:03 +00:00
Merge 035f8a3d14 into 37b2a91aa9
This commit is contained in:
commit
0c2433b2c0
1 changed files with 7 additions and 1 deletions
|
|
@ -22,12 +22,18 @@ class DeleteDatabase implements ShouldQueue
|
|||
protected TenantWithDatabase&Model $tenant,
|
||||
) {}
|
||||
|
||||
public function handle(): void
|
||||
public function handle(): bool
|
||||
{
|
||||
event(new DeletingDatabase($this->tenant));
|
||||
|
||||
if ($this->tenant->getInternal('create_database') === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$this->tenant->database()->manager()->deleteDatabase($this->tenant);
|
||||
|
||||
event(new DatabaseDeleted($this->tenant));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue