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

Update to laravel 8 #217

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Laravel-FCM
# Laravel-FCM (mutliple Firebase projects)

[![Build Status](https://travis-ci.org/brozot/Laravel-FCM.svg?branch=master)](https://travis-ci.org/brozot/Laravel-FCM) [![Coverage Status](https://coveralls.io/repos/github/brozot/Laravel-FCM/badge.svg?branch=master)](https://coveralls.io/github/brozot/Laravel-FCM?branch=master) [![Latest Stable Version](https://poser.pugx.org/brozot/laravel-fcm/v/stable)](https://packagist.org/packages/brozot/laravel-fcm) [![Total Downloads](https://poser.pugx.org/brozot/laravel-fcm/downloads)](https://packagist.org/packages/brozot/laravel-fcm)
[![Build Status](https://travis-ci.org/brozot/Laravel-FCM.svg?branch=master)](https://travis-ci.org/brozot/Laravel-FCM) [![Coverage Status](https://coveralls.io/repos/github/brozot/Laravel-FCM/badge.svg?branch=master)](https://coveralls.io/github/brozot/Laravel-FCM?branch=master) [![Latest Stable Version](https://poser.pugx.org/brozot/laravel-fcm/v/stable)](https://packagist.org/packages/hilalalmansour/laravel-fcm) [![Total Downloads](https://poser.pugx.org/brozot/laravel-fcm/downloads)](https://packagist.org/hilalalmansour/brozot/laravel-fcm)
[![License](https://poser.pugx.org/brozot/laravel-fcm/license)](https://packagist.org/packages/brozot/laravel-fcm)

## Introduction
Expand All @@ -21,15 +21,15 @@ It currently **only supports HTTP protocol** for :
To get the latest version of Laravel-FCM on your project, require it from "composer":


$ composer require brozot/laravel-fcm
$ composer require hilalalmansour/laravel-fcm


Or you can add it directly in your composer.json file:

```json
{
"require": {
"brozot/laravel-fcm": "1.3.*"
"hilalalmansour/laravel-fcm": "1.4.*"
}
}
```
Expand Down Expand Up @@ -143,7 +143,7 @@ $data = $dataBuilder->build();

$token = "a_registration_from_your_database";

$downstreamResponse = FCM::sendTo($token, $option, $notification, $data);
$downstreamResponse = FCM::sendTo($token, $option, $notification, $data, $configKey);

$downstreamResponse->numberSuccess();
$downstreamResponse->numberFailure();
Expand Down Expand Up @@ -182,7 +182,7 @@ $data = $dataBuilder->build();
// You must change it to get your tokens
$tokens = MYDATABASE::pluck('fcm_token')->toArray();

$downstreamResponse = FCM::sendTo($tokens, $option, $notification, $data);
$downstreamResponse = FCM::sendTo($tokens, $option, $notification, $data, $configKey);

$downstreamResponse->numberSuccess();
$downstreamResponse->numberFailure();
Expand Down Expand Up @@ -227,7 +227,7 @@ $notification = $notificationBuilder->build();
$topic = new Topics();
$topic->topic('news');

$topicResponse = FCM::sendToTopic($topic, null, $notification, null);
$topicResponse = FCM::sendToTopic($topic, null, $notification, null, $configKey);

$topicResponse->isSuccess();
$topicResponse->shouldRetry();
Expand Down Expand Up @@ -257,7 +257,7 @@ $topic->topic('news')->andTopic(function($condition) {

});

$topicResponse = FCM::sendToTopic($topic, null, $notification, null);
$topicResponse = FCM::sendToTopic($topic, null, $notification, null, $configKey);

$topicResponse->isSuccess();
$topicResponse->shouldRetry();
Expand All @@ -280,7 +280,7 @@ $notificationBuilder->setBody('Hello world')
$notification = $notificationBuilder->build();


$groupResponse = FCM::sendToGroup($notificationKey, null, $notification, null);
$groupResponse = FCM::sendToGroup($notificationKey, null, $notification, null, $configKey);

$groupResponse->numberSuccess();
$groupResponse->numberFailure();
Expand Down
22 changes: 12 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
{
"name": "brozot/laravel-fcm",
"description": "Laravel / Lumen package for Firebase Cloud Messaging ",
"name": "hilalalmansour/laravel-fcm",
"description": "Laravel / Lumen package for Firebase Cloud Messaging, allow working with multiple Firebase projects ",
"keywords": ["laravel", "lumen", "firebase", "notification", "push", "fcm", "firebase cloud messaging"],
"type": "library",
"license": "MIT",
"authors": [
{
"name": "Nicolas Brosy",
"email": "[email protected]"
},
{
"name": "Hilal Almansour",
"email": "[email protected]"
}
],
"require": {
"php": ">=5.5.9",
"illuminate/support": "5.*|^6",
"guzzlehttp/guzzle": "~6.0",
"php": "^5.5.9 || ^7.0 || ^8.0",
"illuminate/support": "5.* || ^6 || ^7 || ^8",
"guzzlehttp/guzzle": "^6 || ^7",
"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.* || ^6 || ^7 || ^8"
},
"autoload": {
"psr-4": {
Expand All @@ -46,4 +48,4 @@
}
}
}
}
}
Loading