changed logic in push alert notification page #126

Merged
jothi merged 1 commits from ranjith-dev into master 2026-01-24 07:29:32 +00:00

View File

@@ -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)