Added Transaction job new events..
This commit is contained in:
@ -3,6 +3,8 @@
|
||||
namespace App\Jobs\Banking;
|
||||
|
||||
use App\Abstracts\Job;
|
||||
use App\Events\Banking\TransactionUpdated;
|
||||
use App\Events\Banking\TransactionUpdating;
|
||||
use App\Interfaces\Job\ShouldUpdate;
|
||||
use App\Models\Banking\Transaction;
|
||||
|
||||
@ -12,6 +14,8 @@ class UpdateTransaction extends Job implements ShouldUpdate
|
||||
{
|
||||
$this->authorize();
|
||||
|
||||
event(new TransactionUpdating($this->model, $this->request));
|
||||
|
||||
\DB::transaction(function () {
|
||||
$this->model->update($this->request->all());
|
||||
|
||||
@ -32,6 +36,8 @@ class UpdateTransaction extends Job implements ShouldUpdate
|
||||
$this->model->updateRecurring($this->request->all());
|
||||
});
|
||||
|
||||
event(new TransactionUpdated($this->model, $this->request));
|
||||
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user