File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ class Notification extends Message
1111 private $ body ;
1212 private $ badge ;
1313 private $ icon ;
14+ private $ image ;
1415 private $ color ;
1516 private $ sound ;
1617 private $ clickAction ;
@@ -43,6 +44,12 @@ public function setBody($body)
4344 return $ this ;
4445 }
4546
47+ public function setImage ($ image )
48+ {
49+ $ this ->image = $ image ;
50+ return $ this ;
51+ }
52+
4653 /**
4754 * iOS only, will add smal red bubbles indicating the number of notifications to your apps icon
4855 *
@@ -155,7 +162,8 @@ public function hasNotificationData()
155162 $ this ->titleLocArgs ||
156163 $ this ->bodyLocKey ||
157164 $ this ->bodyLocArgs ||
158- $ this ->androidChannelId
165+ $ this ->androidChannelId ||
166+ $ this ->image
159167 ;
160168 }
161169
@@ -175,6 +183,9 @@ public function jsonSerialize()
175183 if ($ this ->icon ) {
176184 $ jsonData ['icon ' ] = $ this ->icon ;
177185 }
186+ if ($ this ->image ) {
187+ $ jsonData ['image ' ] = $ this ->image ;
188+ }
178189 if ($ this ->color ) {
179190 $ jsonData ['color ' ] = $ this ->color ;
180191 }
You can’t perform that action at this time.
0 commit comments