PushNotification: setMessage not defined
Hi I am getting the following error:
Call to undefined method Edujugon\PushNotification\Facades\PushNotification::setMessage()
This is my code:
$push = new PushNotification('apn');
$push->setMessage([
'aps' => [
'alert' => [
'title' => 'This is the title',
'body' => 'This is the body'
],
'sound' => 'default'
],
'extraPayLoad' => [
'custom' => 'My custom data',
]
])
->setDevicesToken(['DEVICE_TOKEN_HERE']);
$push->send();
Also if I use the facade I get success code but no notifications received, any ideas?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (7 by maintainers)
Use
use Edujugon\PushNotification\PushNotification;at the top of your file