added account events
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace App\Jobs\Banking;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Events\Banking\AccountUpdating;
|
||||
use App\Events\Banking\AccountUpdated;
|
||||
use App\Interfaces\Job\ShouldUpdate;
|
||||
use App\Models\Banking\Account;
|
||||
|
||||
@@ -12,6 +14,8 @@ class UpdateAccount extends Job implements ShouldUpdate
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
event(new AccountUpdating($this->model, $this->request));
|
||||
|
||||
\DB::transaction(function () {
|
||||
$this->model->update($this->request->all());
|
||||
|
||||
@@ -22,6 +26,8 @@ class UpdateAccount extends Job implements ShouldUpdate
|
||||
}
|
||||
});
|
||||
|
||||
event(new AccountUpdated($this->model, $this->request));
|
||||
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user