Alert
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Models\Order\Loan;
|
namespace App\Models\Order\Loan;
|
||||||
|
|
||||||
|
use App\Models\Alert;
|
||||||
use App\Models\Branch\Branch;
|
use App\Models\Branch\Branch;
|
||||||
use App\Models\System\Location\Province;
|
use App\Models\System\Location\Province;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
@@ -198,7 +199,8 @@ class LoanOrder extends Model
|
|||||||
static::created(LoanOrderRepo::created());
|
static::created(LoanOrderRepo::created());
|
||||||
static::updated(function (LoanOrder $model) {
|
static::updated(function (LoanOrder $model) {
|
||||||
if ($model->notes && $model->wasChanged('notes')) {
|
if ($model->notes && $model->wasChanged('notes')) {
|
||||||
auth()->user()->alerts()->create([
|
Alert::create([
|
||||||
|
'user_id' => auth()->id(),
|
||||||
'name' => 'Duýdyryş',
|
'name' => 'Duýdyryş',
|
||||||
'value' => $model->notes,
|
'value' => $model->notes,
|
||||||
]);
|
]);
|
||||||
|
|||||||
Reference in New Issue
Block a user