Added Notification page test..

This commit is contained in:
Cüneyt Şentürk
2021-06-30 17:13:08 +03:00
parent 72acc3e3ee
commit 84b76d6a1e
4 changed files with 183 additions and 110 deletions

View File

@ -68,19 +68,24 @@ class Notifications extends Controller
$notifications = $this->getNotifications($path);
foreach ($notifications as $notification) {
if ($notification->id == $id) {
setting()->set('notifications.'. $path . '.' . $id . '.name', $notification->name);
setting()->set('notifications.'. $path . '.' . $id . '.message', $notification->message);
setting()->set('notifications.'. $path . '.' . $id . '.date', Date::now());
setting()->set('notifications.'. $path . '.' . $id . '.status', '0');
if ($notifications) {
foreach ($notifications as $notification) {
if ($notification->id == $id) {
setting()->set('notifications.'. $path . '.' . $id . '.name', $notification->name);
setting()->set('notifications.'. $path . '.' . $id . '.message', $notification->message);
setting()->set('notifications.'. $path . '.' . $id . '.date', Date::now());
setting()->set('notifications.'. $path . '.' . $id . '.status', '0');
setting()->save();
break;
setting()->save();
break;
}
}
}
return response()->json([
'message' => trans('messages.success.disabled', [
'type' => Str::lower(trans_choice('general.notifications', 2))
]),
'success' => true,
'error' => false,
'data' => null,