how to send picture in push notification in laravel using onesignal

Viewed 14

I am using berkyak laravel onesignal lib to send push notifications, i need to send big_picture but dont know how to get the picture from my storage in laravel and send it to onesignal below is my custom function which send push notification to users with email tag

function sendPush($email, $notification_title, $notification_message) {
    $path           = "need url of picture, how to get when picture is stored in storage";
    $onesignal_data = [
        "android_accent_color"  => "FF2f80ed",
        "headings" => ["en" => $notification_title],
        "contents" => ["en" => $notification_message],
        "big_picture" => $path
    ];

    OneSignal::addParams($onesignal_data)
        ->sendNotificationUsingTags(
            '',
            array([
                    "field" => "tag", 
                    "key"   => "email", 
                    "value" => $email
                ])
        );
}

above in $path variable i need a path to picture but how to get it from picture stored in laravel?

0 Answers
Related