Skip to content

Update README.md #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Currently this app server library only supports sending Messages/Notifications v

See original Firebase docs: https://firebase.google.com/docs/

#Setup
# Setup
Install via Composer:
```
composer require sngrl/php-firebase-cloud-messaging
Expand All @@ -19,7 +19,7 @@ Or add this to your composer.json and run "composer update":
}
```

#Send message to Device
# Send message to Device
```
use sngrl\PhpFirebaseCloudMessaging\Client;
use sngrl\PhpFirebaseCloudMessaging\Message;
Expand All @@ -44,7 +44,7 @@ var_dump($response->getStatusCode());
var_dump($response->getBody()->getContents());
```

#Send message to multiple Devices
# Send message to multiple Devices

```
...
Expand All @@ -59,7 +59,7 @@ $message
;
...
```
#Send message to Topic
# Send message to Topic

```
use sngrl\PhpFirebaseCloudMessaging\Client;
Expand All @@ -85,7 +85,7 @@ var_dump($response->getStatusCode());
var_dump($response->getBody()->getContents());
```

#Send message to multiple Topics
# Send message to multiple Topics

See Firebase documentation for sending to [combinations of multiple topics](https://firebase.google.com/docs/cloud-messaging/topic-messaging#sending_topic_messages_from_the_server).

Expand All @@ -105,7 +105,7 @@ $message
...
```

#Subscribe user to the topic
# Subscribe user to the topic
```
use sngrl\PhpFirebaseCloudMessaging\Client;

Expand All @@ -119,7 +119,7 @@ var_dump($response->getStatusCode());
var_dump($response->getBody()->getContents());
```

#Remove user subscription to the topic
# Remove user subscription to the topic
```
use sngrl\PhpFirebaseCloudMessaging\Client;

Expand Down