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
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Reviewed-on: #126
This commit was merged in pull request #126.
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user