Closed mgralikowski closed 8 months ago
Message data can only be string keys and string values, as documented in the Firebase REST API docs at https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#resource:-message, so, nested data is not possible.
So this is the intended behavior, but if you can make a PR changing the code to accept nested data and a test that shows that it's working, or if you can point me to where this is done in one of the official Admin SDK, I will, of course, look into it.
Could it be that your previous implementation serialized the models to a string and unserialized it on the target device?
Describe the bug
Hello,
In our previous FCM integration, we utilized Laravel Resources within the FCM data. Is this still supported? I'm asking because we're encountering errors like:
Object of class App\Http\Resources\User could not be converted to a string
.My understanding is that this library converts all data to a string. Is this the intended behavior? This could also result in errors when passing a raw array (nested array).
Installed packages
PHP version and extensions
Steps to reproduce the issue.
Error message/Stack trace
Additional information
No response