Skip to content

Commit

Permalink
update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
erlangparasu committed Feb 28, 2020
1 parent 07f901c commit e7d55ac
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,30 +122,3 @@ fcm()
])
->send();
```

### Notes

## Sending different payloads

This packages uses a singleton pattern for the `Fcm` facade and `fcm()` helper.
If you want to send different payloads to Firebase in the same request you have to use use the `Kawankoding\Fcm\Fcm` class directly:

```php
use Kawankoding\Fcm\Fcm;

$fcm1 = new Fcm;
$fcm1->to($recipients)
->data([
'title' => 'Test FCM 1',
'body' => 'This is a test of FCM 1',
])
->send();

$fcm2 = new Fcm;
$fcm2->to($recipients)
->notification([
'title' => 'Test FCM 2',
'body' => 'This is a test of FCM 2',
])
->send();
```

0 comments on commit e7d55ac

Please sign in to comment.