kawankoding / laravel-fcm

Firebase Cloud Messaging (FCM) sender for Laravel
172 stars 56 forks source link

Push notification not working #35

Closed kossa closed 4 years ago

kossa commented 4 years ago

Hello,

I'm trying to use this package, it's very simple and awesome, but it does not works,

Here is the code : image

And the response in browser: image

I did not receive any notification, when I try from firebase I got it : image

erlangparasu commented 4 years ago

after priority, try add ->timeToLive(0) sir

erlangparasu commented 4 years ago

and try using

    ->notification([
        'title' => 'Test FCM',
        'body' => 'This is a test of FCM',
    ])

instead of ->data( to achieve behavior like Firebase Console sir

kossa commented 4 years ago

Alright, works fine, but it does not exist in the readme file

erlangparasu commented 4 years ago

by default, Firebase server will queue your notification in 4 weeks

kossa commented 4 years ago

Nice to know thank you @erlangp

ahmedkamel1192 commented 4 years ago

response return null !!! how can i get response

erlangparasu commented 4 years ago

@ahmedkamel1192 please provide your code sir :) so we can reproduce for testing

erlangparasu commented 1 year ago

Hi, @ahmedkamel1192.. maybe you can try to enable debug response. then check the firebase log in the laravel.log file.

fcm()
    ->to($recipients)
    // ...
    ->enableResponseLog()
    ->send();