16 lines
330 B
PHP
16 lines
330 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
return function ($group, $notificationId) {
|
||
|
|
$notifications = Yaml::decode($this->notifications()->value());
|
||
|
|
|
||
|
|
try {
|
||
|
|
$notifications[$group][$notificationId]['isRead'] = true;
|
||
|
|
} catch (\Throwable $th) {
|
||
|
|
//throw $th;
|
||
|
|
}
|
||
|
|
|
||
|
|
$this->update([
|
||
|
|
"notifications" => $notifications
|
||
|
|
]);
|
||
|
|
return $notifications;
|
||
|
|
};
|