Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

channelId support (FCM)

grappetite-tahir opened this issue · comments

This is my current code which is working and its sending push notifications to the users, but channelId is not working I don't know where to put this key, can someone help me or change my existing code to the actual working code for channelId thanks!

`$push = new PushNotification('fcm');

    $push->setMessage([
        'notification' => [
            'title' => $data['title'],
            'body'  => $data['body'],
            'sound' => 'default',
            'channelId' => isset($data['channelId']) ? $data['channelId'] : '',
        ],
        'data' => $data['data'],
    ])->setDevicesToken($data['device_tokens'])->send();`

Could you solve this?