Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Image support on PayloadNotification #223

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ $optionBuilder = new OptionsBuilder();
$optionBuilder->setTimeToLive(60*20);

$notificationBuilder = new PayloadNotificationBuilder('my title');
$notificationBuilder->setBody('Hello world')
->setSound('default');
$notificationBuilder->setBody('Hello world')->setSound('default');

$dataBuilder = new PayloadDataBuilder();
$dataBuilder->addData(['a_data' => 'my_data']);
Expand Down Expand Up @@ -169,8 +168,7 @@ $optionBuilder = new OptionsBuilder();
$optionBuilder->setTimeToLive(60*20);

$notificationBuilder = new PayloadNotificationBuilder('my title');
$notificationBuilder->setBody('Hello world')
->setSound('default');
$notificationBuilder->setBody('Hello world')->setSound('default');

$dataBuilder = new PayloadDataBuilder();
$dataBuilder->addData(['a_data' => 'my_data']);
Expand Down Expand Up @@ -219,8 +217,7 @@ use LaravelFCM\Message\Topics;

```php
$notificationBuilder = new PayloadNotificationBuilder('my title');
$notificationBuilder->setBody('Hello world')
->setSound('default');
$notificationBuilder->setBody('Hello world')->setSound('default');

$notification = $notificationBuilder->build();

Expand All @@ -245,8 +242,7 @@ It sends notification to devices registered at the following topics:

```php
$notificationBuilder = new PayloadNotificationBuilder('my title');
$notificationBuilder->setBody('Hello world')
->setSound('default');
$notificationBuilder->setBody('Hello world')->setSound('default');

$notification = $notificationBuilder->build();

Expand Down Expand Up @@ -274,8 +270,7 @@ $notificationKey = ['a_notification_key'];


$notificationBuilder = new PayloadNotificationBuilder('my title');
$notificationBuilder->setBody('Hello world')
->setSound('default');
$notificationBuilder->setBody('Hello world')->setSound('default');

$notification = $notificationBuilder->build();

Expand Down Expand Up @@ -351,10 +346,7 @@ See the [official documentation](https://firebase.google.com/docs/cloud-messagin

```php
$notificationBuilder = new PayloadNotificationBuilder();
$notificationBuilder->setTitle('title')
->setBody('body')
->setSound('sound')
->setBadge('badge');
$notificationBuilder->setTitle('title')->setBody('body')->setImage('image_url')->setSound('sound')->setBadge('badge');

$notification = $notificationBuilder->build();
```
Expand Down
24 changes: 16 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "brozot/laravel-fcm",
"name": "netodomenico/laravel-fcm",
"description": "Laravel / Lumen package for Firebase Cloud Messaging ",
"keywords": ["laravel", "lumen", "firebase", "notification", "push", "fcm", "firebase cloud messaging"],
"type": "library",
Expand All @@ -8,19 +8,22 @@
{
"name": "Nicolas Brosy",
"email": "[email protected]"
},
{
"name": "Domenico Neto",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.5.9",
"illuminate/support": "5.*|^6",
"guzzlehttp/guzzle": "~6.0",
"php": "^5.0|^7.0|^8.0",
"illuminate/support": "^5.0|^6.0|^7.0|^8.0|^9.0",
"guzzlehttp/guzzle": "^6.0|^7.0",
"monolog/monolog": "^1.12|^2.0"
},
"require-dev": {
"mockery/mockery" : "0.9.*",
"phpunit/phpunit" : "4.7.*",
"satooshi/php-coveralls": "dev-master",
"laravel/laravel": "5.2.*"
"phpunit/phpunit" : "^4|^5|^6|^7|^8|^9",
"laravel/laravel": "5.2.*|^6.0|^7.0|^8.0|^9.0"
},
"autoload": {
"psr-4": {
Expand All @@ -45,5 +48,10 @@
"FCMGroup": "LaravelFCM\\Facades\\FCMGroup"
}
}
},
"config": {
"allow-plugins": {
"kylekatarnls/update-helper": true
}
}
}
}
Loading