Skip to content

Commit 826b62f

Browse files
authored
Merge pull request #20 from erlangp/patch-1
Update Fcm.php
2 parents e7d3b7c + fb5406e commit 826b62f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Fcm.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
*/
99
class Fcm
1010
{
11-
protected $recipient;
11+
protected $recipients;
1212
protected $topic;
1313
protected $data;
1414
protected $notification;
1515

16-
public function to(array $recipient)
16+
public function to(array $recipients)
1717
{
18-
$this->recipient = $recipient;
18+
$this->recipients = $recipients;
1919

2020
return $this;
2121
}
@@ -55,14 +55,14 @@ public function send()
5555
if ($this->topic) {
5656
$payloads['to'] = "/topics/{$this->topic}";
5757
} else {
58-
$payloads['registration_ids'] = $this->recipient;
58+
$payloads['registration_ids'] = $this->recipients;
5959
}
6060

6161
$serverKey = config('laravel-fcm.server_key');
6262

6363
$headers = [
64-
'Authorization:key=' . $serverKey,
65-
'Content-Type:application/json'
64+
'Authorization: key=' . $serverKey,
65+
'Content-Type: application/json'
6666
];
6767

6868
$ch = curl_init();

0 commit comments

Comments
 (0)