berkayk / laravel-onesignal

OneSignal Push Notifications for Laravel
506 stars 176 forks source link

OneSignal::setParam('headings', $headings) is sending notification twice #106

Closed shunyauads closed 4 years ago

shunyauads commented 5 years ago

When using the code below, one signal is sending the notification two times.

OneSignal::setParam('headings', $headings)
                    ->sendNotificationToAll (
                        $body,
                        $url = null,
                        $data = $dataToNotify,
                        $buttons = null,
                        $schedule = null
                    );
Appsbender commented 5 years ago

Try this one. OneSignal::sendNotificationToAll( 'You message', 'player id', null, null, null, array( "en" => "Custom Header Name" ));

nladev commented 4 years ago

OneSignal::sendNotificationToAll( "This is message.", $url = null, $data = null, $buttons = null, $schedule = null, $headings = "Heading is here" );