This commit is contained in:
nurmuhammet committed 2024-11-29 15:21:17 +05:00
1 parent 175dad56aa
commit 7d212ab9f3
1 file changed
+3 -1
+3 -1
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 @@ protected static function boot()
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,
]);