Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.
MIT License
478 stars 159 forks source link

I want To send image with title and body #114

Open HadeelMohamed opened 4 years ago

HadeelMohamed commented 4 years ago

I want to send image this my code $push = new PushNotification('fcm');

 $push->setMessage([
    'notification' => [
            'title'=>'Test Image',
            'body'=>'HEY Image',
            'sound' => 'when.ogg'

    ],
     'data' => [
                'image_url' => 'http://sekka.local.momentum-sol.com/media/1/conversions/avatar-thumb_150.jpg',
            ]
    ])
            ->setDevicesToken(['token'])
            ->send();
Edujugon commented 4 years ago

Hi @HadeelMohamed ,

Not sure if understand what the problem is... Your code looks good to me, do you get any error message? Could you elaborate a bit more on the issue?

HadeelMohamed commented 4 years ago

Hey @Edujugon Thank you for your reply, I want send image with notification fcm but no image received only title and body

vesper8 commented 4 years ago

@HadeelMohamed did you figure it out? Can you get images to show up in your FCM notifications now? If so can you explain how you did it? Thanks