akaunting 3.0 (the last dance)
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
namespace App\Jobs\Auth;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Events\Auth\RoleUpdated;
|
||||
use App\Events\Auth\RoleUpdating;
|
||||
use App\Interfaces\Job\ShouldUpdate;
|
||||
use App\Models\Auth\Role;
|
||||
|
||||
@ -10,6 +12,8 @@ class UpdateRole extends Job implements ShouldUpdate
|
||||
{
|
||||
public function handle(): Role
|
||||
{
|
||||
event(new RoleUpdating($this->model, $this->request));
|
||||
|
||||
\DB::transaction(function () {
|
||||
$this->model->update($this->request->all());
|
||||
|
||||
@ -18,6 +22,8 @@ class UpdateRole extends Job implements ShouldUpdate
|
||||
}
|
||||
});
|
||||
|
||||
event(new RoleUpdated($this->model, $this->request));
|
||||
|
||||
return $this->model;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user