designtopack/public/site/plugins/notifications/user-methods/read.php

16 lines
330 B
PHP
Raw Normal View History

2024-10-29 16:13:07 +01:00
<?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;
};