Skip to content

do you know if this works with iphone device token and Firebase? #45

Open
@olkotz

Description

@olkotz

Hellow, first, thanks for share your work with us.

I dont have any response when i send notifications to an iPhone device. With php Curl the notifications works fine, but when i use FCM dosent send.

This is my code:

$fcm_token = User::select('fcm_token')->where('id',$request->partner_id)->first()->toArray();
$respuesta = fcm()
->to($fcm_token) // $recipients must an array
->priority('normal')
->timeToLive(0)
->data([
'sender_id' => intval($request->user_id),
'sender_name' => $user->name,
'type' => 'partner',
'date' => $request->date,
'shift' => $user->shift_id
])
->notification([
'title' => 'Test FCM',
'body' => 'This is a test of FCM',
])
->send();
->send();

And the return of json_encode($respuesta) is {}

Thanks again!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions