Skip to content

Commit 5b03c2c

Browse files
committed
change function name to send a push notification
1 parent abf5796 commit 5b03c2c

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

readme.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,29 @@ return [
5757
If You want to send a FCM with just notification parameter, this is an example of usage sending a FCM with only data parameter :
5858
```php
5959
fcm()
60-
->to($recipients)
60+
->to($recipients) // $recipients must an array
6161
->data([
6262
'title' => 'Test FCM',
6363
'body' => 'This is a test of FCM',
6464
])
65-
->push();
65+
->send();
6666
```
6767

6868
If You want to send a FCM with just notification parameter,this is an example of usage sending a FCM with only notification parameter :
6969
```php
7070
fcm()
71-
->to($recipients)
71+
->to($recipients) // $recipients must an array
7272
->notification([
7373
'title' => 'Test FCM',
7474
'body' => 'This is a test of FCM',
7575
])
76-
->push();
76+
->send();
7777
```
7878

7979
If You want to send a FCM with both data & notification parameter, this is an example of usage sending a FCM with both data & notification parameter :
8080
```php
8181
fcm()
82-
->to($recipients)
82+
->to($recipients) // $recipients must an array
8383
->data([
8484
'title' => 'Test FCM',
8585
'body' => 'This is a test of FCM',
@@ -88,5 +88,5 @@ fcm()
8888
'title' => 'Test FCM',
8989
'body' => 'This is a test of FCM',
9090
])
91-
->push();
91+
->send();
9292
```

src/Kawankoding/Fcm/Fcm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function notification(array $notification = [])
3333
return $this;
3434
}
3535

36-
public function push()
36+
public function send()
3737
{
3838
$fcmEndpoint = 'https://fcm.googleapis.com/fcm/send';
3939

0 commit comments

Comments
 (0)