designtopack/public/site/plugins/notifications/user-methods/read.php
2024-10-29 16:32:49 +01:00

16 lines
No EOL
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;
};