We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a42d19a + 6762fdd commit f0f9fe1Copy full SHA for f0f9fe1
src/Fcm.php
@@ -16,6 +16,7 @@ class Fcm
16
protected $notification;
17
protected $timeToLive;
18
protected $priority;
19
+ protected $package;
20
21
protected $serverKey;
22
@@ -72,6 +73,13 @@ public function timeToLive($timeToLive)
72
73
74
return $this;
75
}
76
+
77
+ public function setPackage($package)
78
+ {
79
+ $this->package = $package;
80
81
+ return $this;
82
+ }
83
84
public function send()
85
{
@@ -81,6 +89,11 @@ public function send()
89
'data' => $this->data,
90
'notification' => $this->notification
91
];
92
93
+ if(!empty($this->package))
94
95
+ $payloads['restricted_package_name'] = $this->package;
96
97
98
if ($this->topic) {
86
99
$payloads['to'] = "/topics/{$this->topic}";
0 commit comments