akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@ -3,6 +3,8 @@
namespace App\Jobs\Auth;
use App\Abstracts\Job;
use App\Events\Auth\UserDeleted;
use App\Events\Auth\UserDeleting;
use App\Interfaces\Job\ShouldDelete;
class DeleteUser extends Job implements ShouldDelete
@ -11,12 +13,16 @@ class DeleteUser extends Job implements ShouldDelete
{
$this->authorize();
event(new UserDeleting($this->model));
\DB::transaction(function () {
$this->model->delete();
$this->model->flushCache();
});
event(new UserDeleted($this->model));
return true;
}