alfa6661 / laravel-firebase Goto Github PK
View Code? Open in Web Editor NEWGoogle Firebase Notification for Laravel
Google Firebase Notification for Laravel
Hi,
Suppor for Laravel 5.3?
Greetings.
Should use the skeleton then submit pull request to new-channels to put this package on the list of official channel
Steps to recreate:
Expected result:
Actual result:
I have tried to fix this and found the error is the addRecipent in the for loop in the send() method of FirebaseChannel. I solved the problem by changing it to:
public function send($notifiable, Notification $notification)
{
$devices = $notifiable->routeNotificationFor('firebase');
if (empty($devices)) {
return;
}
$firebase = $notification->toFirebase($notifiable);
foreach ($devices as $device) {
$this->message->addRecipient(new Device($device));
}
$this->message->setNotification($firebase->notification)->setData($firebase->data);
try {
$response = $this->client->send($this->message);
} catch (Exception $e) {
}
}
class Alfa6661\Firebase\FirebaseChannel method send
try {
foreach ($devices as $device) {
$this->message->addRecipient(new Device($device))//<New senders are added every time you send
->setNotification($firebase->notification)
->setData($firebase->data);
$response = $this->client->send($this->message);
}
} catch (Exception $ex) {
}
As a result, everyone sees the messages of all.
This is the case if messages are sent through the queue
Hi,
A question,
Is there any possibility of handling notifications in this way as this example indicates?
Example: priority, force-start
phonegap/phonegap-plugin-push#1506
Greetings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.