changed logic in push alert notification page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / Gemini PR Review (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Failing after 2m14s
Laravel Larastan / larastan (pull_request) Failing after 2m18s

This commit is contained in:
dhanabalan
2026-01-24 12:58:57 +05:30
parent 28503a25c3
commit d2a2a35410

View File

@@ -31,9 +31,25 @@ class PushAlertNotification extends Notification
$this->body = $body; $this->body = $body;
} }
// public function via($notifiable)
// {
// return [WebPushChannel::class];
// }
public function via($notifiable) 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) // public function toWebPush($notifiable, $notification)