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)