You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have no problem sending message to single device with user token, but now i need to send notification to a topic what should i do?
This is my code
use NotificationChannels\FCM\FCMMessageTopic;
.....
public function toFCM($notifiable)
{
return (new FCMMessageTopic())
->to($this->topic)
->notification([
'title' => 'Notification title',
'body' => 'Notification body',
]);
}
and it return this error
FatalThrowableError in FirebaseNotification.php line 43:
Call to undefined method NotificationChannels\FCM\Exceptions\InvalidArgumentException::notification()
The text was updated successfully, but these errors were encountered:
I have no problem sending message to single device with user token, but now i need to send notification to a topic what should i do?
This is my code
and it return this error
The text was updated successfully, but these errors were encountered: