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