Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fcmhttpbundle Laravel Package

digitalap/fcmhttpbundle

View on GitHub
Deep Wiki
Context7

FcmHttpBundle

Firebase Cloud Messaging Bundle of Symfony

Installation

By composer

  composer require digitalap/fcmhttpbundle

Enable the Bundle

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new DigitalAp\FcmHttpBundle\FcmHttpBundle(),
        );

        // ...
    }

    // ...
}

Configuration

# app/config/config.yml

fcm_http:
  autentication_api_key: keycode ....

Usage

The notification has multiple properties, see FCM [documentation] (https://firebase.google.com/docs/cloud-messaging/http-server-ref) to view. You'll find everyone at FcmHttpBUndle with their getters and setters.


        //A MESSAGE MAY HAVE A NOTIFICATION OR NO
        $notification = new Notification('Text','Body');
        $notification->enableSound();
        
        //Put that one or more relations_id. Message expects an array as parameter
        //If it is greater than a thousand relations_ids the bundle will send the messages in a thousand
        $message = new Message(array(
            '0'
            '1'
        ));
        
        //A message may not have a notification or a data, but it must have one of the two.
        $message->setNotification($notification);
        
        $guzzle = $this->get('fcm_http.send')->send($message);
        
        // response for server 
        dump(guzzle)
        //Each index of the array returned by the response means a lot of one thousand messages
        dump($guzzle[0]->getBody()->getContents());

This bundle uses the Guzzle php library


License FcmHttpBundle is licensed under the MIT license

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
babenkoivan/elastic-client
innmind/static-analysis
innmind/coding-standard
datacore/hub-sdk
alengo/sulu-http-cache-bundle
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity