Compare commits

...

2 Commits

Author SHA1 Message Date
ff607695bc Merge pull request 'changed logic in push alert notification page' (#126) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Reviewed-on: #126
2026-01-24 07:29:31 +00:00
dhanabalan
d2a2a35410 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
2026-01-24 12:58:57 +05:30

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)