From 459ece23be8d38e4a151083279a4ef211ad58c5f Mon Sep 17 00:00:00 2001 From: Daniel Alexander <38150405+ander890@users.noreply.github.com> Date: Sat, 3 Jul 2021 14:59:11 +0700 Subject: [PATCH 1/3] Add image option --- src/OneSignalClient.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/OneSignalClient.php b/src/OneSignalClient.php index 4d600c6..b8ed7f9 100644 --- a/src/OneSignalClient.php +++ b/src/OneSignalClient.php @@ -267,7 +267,7 @@ public function sendNotificationUsingTags($message, $tags, $url = null, $data = $this->sendNotificationCustom($params); } - public function sendNotificationToAll($message, $url = null, $data = null, $buttons = null, $schedule = null, $headings = null, $subtitle = null) { + public function sendNotificationToAll($message, $url = null, $data = null, $buttons = null, $schedule = null, $headings = null, $subtitle = null, $image = null) { $contents = array( "en" => $message ); @@ -305,6 +305,11 @@ public function sendNotificationToAll($message, $url = null, $data = null, $butt "en" => $subtitle ); } + + if(isset($image)){ + $params['big_picture'] = $image; + $params['chrome_web_image'] = $image; + } $this->sendNotificationCustom($params); } From 178b6a2cb65ae2484bdb5900ac177fdeaf11d26d Mon Sep 17 00:00:00 2001 From: Daniel Alexander <38150405+ander890@users.noreply.github.com> Date: Sat, 3 Jul 2021 15:00:20 +0700 Subject: [PATCH 2/3] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9c2fdde..356aa68 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "berkayk/onesignal-laravel", + "name": "ander890/onesignal-laravel", "description": "OneSignal Push Wrapper Laravel", "keywords": ["onesignal", "webpush", "push", "laravel", "laravel 5"], "type": "library", From c3036ea02bc2600b93840c9be43d186aa4987cc1 Mon Sep 17 00:00:00 2001 From: Daniel Alexander <38150405+ander890@users.noreply.github.com> Date: Sat, 3 Jul 2021 15:09:41 +0700 Subject: [PATCH 3/3] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 356aa68..9c2fdde 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "ander890/onesignal-laravel", + "name": "berkayk/onesignal-laravel", "description": "OneSignal Push Wrapper Laravel", "keywords": ["onesignal", "webpush", "push", "laravel", "laravel 5"], "type": "library",