detach company/dashboard after deletion

This commit is contained in:
Denis Duliçi 2021-03-29 23:49:19 +03:00
parent 5f8295fafa
commit 9a82779f99
2 changed files with 4 additions and 0 deletions

View File

@ -40,6 +40,8 @@ class DeleteCompany extends Job
'recurring', 'reports', 'settings', 'taxes', 'transactions', 'transfers', 'widgets',
]);
$this->company->users()->detach();
$this->company->delete();
});

View File

@ -33,6 +33,8 @@ class DeleteDashboard extends Job
\DB::transaction(function () {
$this->deleteRelationships($this->dashboard, ['widgets']);
$this->dashboard->users()->detach();
$this->dashboard->delete();
});