kawankoding/laravel-fcm

Push notification not working

kossa opened this issue · 8 comments

kossa commented

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

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

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

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

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

kossa commented

Nice to know thank you @erlangp

response return null !!! how can i get response

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

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();