Closed haleyngonadi closed 1 year ago
I, unfortunately, can't seem to get the web push to work with a link. Can you please confirm if this code is correct?
public function toFcm() { return FcmMessage::create() ->setData(['type' => 'date_change', 'route' => 'Show']) ->setNotification( \NotificationChannels\Fcm\Resources\Notification::create() ->setTitle($title) ->setBody($message) ->setImage('https://i.ytimg.com/vi/NS4f-BumfeQ/maxresdefault.jpg') ) ->setWebpush( \NotificationChannels\Fcm\Resources\WebpushConfig::create() ->setFcmOptions(WebpushFcmOptions::create()->setAnalyticsLabel('analytics_web')->setLink('https://google.com')) ); }
Figured this out – FCMOptions just aren't available when the app is in the background.
I, unfortunately, can't seem to get the web push to work with a link. Can you please confirm if this code is correct?