Notifications are sent, no problem mais I wish to have a badge on the notifications it is never used, I went through all the firebase documentation nothing to do. As is the keyword field.
Package used : edujugon/push-notification:4.5
$devices[] = $deviceData['id'];
$push = new PushNotification('fcm');
$push->setMessage([
'notification' => [
'title' => $this->title,
'body' => $this->body,
'badge' => $this->badge,
],
])
->setApiKey($this->apiKeyFirebase)
->setDevicesToken($devices)
->send();
With this array sent, I am not receiving the notification under IOS, so the feedback from the ios server tells me that the notification has been sent, there must be a problem with the keys to my array that I am sending, I don’t haven't found, would anyone know?
$devices[] = $deviceData['id'];
$push = new PushNotification('apn');
$push->setMessage([
'aps' => [
'alert' => [
'title' => $this->title,
'body' => $this->body,
],
'badge' => $this->badge,
],
])
->setConfig($this->getConfig())
->setDevicesToken($devices)
->send();
question from:
https://stackoverflow.com/questions/66066374/data-array-to-send-push-notification-in-project-php-for-android-ios 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…