|
1 |
| -# Laravel-FCM (maintained version of the abandonned "official" repository) |
| 1 | +# Laravel-FCM (added support for multiple FCM account on code-lts/Laravel-FCM repository) |
2 | 2 |
|
3 | 3 | 
|
4 | 4 | [](https://codecov.io/gh/code-lts/laravel-fcm)
|
@@ -157,7 +157,7 @@ $data = $dataBuilder->build();
|
157 | 157 |
|
158 | 158 | $token = "a_registration_from_your_database";
|
159 | 159 |
|
160 |
| -$downstreamResponse = FCM::sendTo($token, $option, $notification, $data); |
| 160 | +$downstreamResponse = FCM::sendTo($token, $option, $notification, $data, $senderId, $serverKey); |
161 | 161 |
|
162 | 162 | $downstreamResponse->numberSuccess();
|
163 | 163 | $downstreamResponse->numberFailure();
|
@@ -196,7 +196,7 @@ $data = $dataBuilder->build();
|
196 | 196 | // You must change it to get your tokens
|
197 | 197 | $tokens = MYDATABASE::pluck('fcm_token')->toArray();
|
198 | 198 |
|
199 |
| -$downstreamResponse = FCM::sendTo($tokens, $option, $notification, $data); |
| 199 | +$downstreamResponse = FCM::sendTo($tokens, $option, $notification, $data, $senderId, $serverKey); |
200 | 200 |
|
201 | 201 | $downstreamResponse->numberSuccess();
|
202 | 202 | $downstreamResponse->numberFailure();
|
@@ -271,7 +271,7 @@ $topic->topic('news')->andTopic(function($condition) {
|
271 | 271 |
|
272 | 272 | });
|
273 | 273 |
|
274 |
| -$topicResponse = FCM::sendToTopic($topic, null, $notification, null); |
| 274 | +$topicResponse = FCM::sendToTopic($topic, null, $notification, null, $senderId, $serverKey); |
275 | 275 |
|
276 | 276 | $topicResponse->isSuccess();
|
277 | 277 | $topicResponse->shouldRetry();
|
@@ -320,7 +320,7 @@ $notification = $notificationBuilder->build();
|
320 | 320 |
|
321 | 321 | $notificationKey = ['a_notification_key'];
|
322 | 322 |
|
323 |
| -$groupResponse = FCM::sendToGroup($notificationKey, null, $notification, null); |
| 323 | +$groupResponse = FCM::sendToGroup($notificationKey, null, $notification, null, $senderId, $serverKey); |
324 | 324 |
|
325 | 325 | $groupResponse->numberSuccess();
|
326 | 326 | $groupResponse->numberFailure();
|
|
0 commit comments