Closed write-programmer closed 2 years ago
It's not clear to me why these changes would have an impact when using an anonymous notifiable. All it does it make an assumption that the notifiable
would have the fcm_token
property set which seems specific to your app.
It sounds like perhaps the via
method of your notification isn't returning FcmChannel
. You can inspect $notifiable
in the via
method and make decisions based upon whether it is an instance of AnonymousNotifiable
or not.
The toFcm method is never called when using the
Notification::route(FcmChannel::class, $user->notification_token)->notify(new ExampleNotify($object));
method. We don't get an error message.