diff --git a/app/Notifications/PushAlertNotification.php b/app/Notifications/PushAlertNotification.php index e4b8081..4a8ac79 100644 --- a/app/Notifications/PushAlertNotification.php +++ b/app/Notifications/PushAlertNotification.php @@ -31,9 +31,25 @@ class PushAlertNotification extends Notification $this->body = $body; } + // public function via($notifiable) + // { + // return [WebPushChannel::class]; + // } + public function via($notifiable) { - return [WebPushChannel::class]; + return [ + 'database', // ✅ Filament toast + WebPushChannel::class // ✅ Browser / PWA push + ]; + } + + public function toDatabase($notifiable): array + { + return [ + 'title' => $this->title, + 'body' => $this->body, + ]; } // public function toWebPush($notifiable, $notification)