This commit is contained in:
2024-11-29 15:21:17 +05:00
parent 175dad56aa
commit 7d212ab9f3

View File

@@ -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,
]);