From 250abe0413b9930ba1ef84aa813881aad665dc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Thu, 21 Dec 2023 01:20:03 +0300 Subject: [PATCH] Notification mark read and mark real all feature issue solved. --- app/Http/Livewire/Menu/Notifications.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/Http/Livewire/Menu/Notifications.php b/app/Http/Livewire/Menu/Notifications.php index 12b1df15b68..d391a301725 100644 --- a/app/Http/Livewire/Menu/Notifications.php +++ b/app/Http/Livewire/Menu/Notifications.php @@ -49,10 +49,7 @@ public function markRead($type, $notification_id, $message = true) $type = isset($data['file_name']) ?: trans('general.export'); - $this->dispatchBrowserEvent('mark-read', [ - 'type' => 'notification', - 'message' => trans('notifications.messages.mark_read', ['type' => $type]), - ]); + $this->dispatch('mark-read', type: 'notification', message: trans('notifications.messages.mark_read', ['type' => $type])); } public function markReadAll() @@ -63,10 +60,7 @@ public function markReadAll() $this->markRead($notification->type, $notification->id, false); } - $this->dispatchBrowserEvent('mark-read-all', [ - 'type' => 'notification', - 'message' => trans('notifications.messages.mark_read_all', ['type' => trans('general.export')]), - ]); + $this->dispatch('mark-read-all', type: 'notification', message: trans('notifications.messages.mark_read_all', ['type' => trans('general.export')])); } public function markUpdateRead($notification_id)