fcm
fcm copied to clipboard
how we send web notification using the setWebPush plz guide me
how we use this function setWebpush(NotificationChannels\Fcm\Resources\WebpushConfig $webpushConfig)
what's the $webpushConfig?
public function toFcm($notifiable)
{
return FcmMessage::create()
->setNotification(
\NotificationChannels\Fcm\Resources\Notification::create()
->setTitle('Excel uploading status')
->setBody($this->data['type'] . ' data uploading failed!')
->setImage('imageUrl')
)
->setWebpush(
WebpushConfig::create()
->setFcmOptions(WebpushFcmOptions::create())
);
}