PHPackages                             irfanmumtaz/firebase-cloud-message - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. irfanmumtaz/firebase-cloud-message

ActiveProject[Mail &amp; Notifications](/categories/mail)

irfanmumtaz/firebase-cloud-message
==================================

Laravel-FCM is an easy to use package working with both Laravel for sending push notification with Firebase Cloud Messaging (FCM)

0.1.3(2y ago)03.6k↓86.7%MITPHP

Since Dec 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/IrfanMumtaz/laravel-fcm)[ Packagist](https://packagist.org/packages/irfanmumtaz/firebase-cloud-message)[ RSS](/packages/irfanmumtaz-firebase-cloud-message/feed)WikiDiscussions main Synced yesterday

READMEChangelogDependencies (1)Versions (5)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/3607e224fe20ccaf35f309ccebf80a02b7950f460cf4450148cddeaf76e7cf47/687474703a2f2f706f7365722e707567782e6f72672f697266616e6d756d74617a2f66697265626173652d636c6f75642d6d6573736167652f76)](https://packagist.org/packages/irfanmumtaz/firebase-cloud-message)[![Total Downloads](https://camo.githubusercontent.com/a230fb3bb81ed3ab32134f8613c1417fa7bf6b2de093282dcbd8504900a6b65e/687474703a2f2f706f7365722e707567782e6f72672f697266616e6d756d74617a2f66697265626173652d636c6f75642d6d6573736167652f646f776e6c6f616473)](https://packagist.org/packages/irfanmumtaz/firebase-cloud-message)[![License](https://camo.githubusercontent.com/54c1f92bcb1e0465a25c142c0a3234700a3690c32b52fad5032df6125a03b0d3/687474703a2f2f706f7365722e707567782e6f72672f697266616e6d756d74617a2f66697265626173652d636c6f75642d6d6573736167652f6c6963656e7365)](https://packagist.org/packages/irfanmumtaz/firebase-cloud-message)

LARAVEL FCM
===========

[](#laravel-fcm)

Laravel-FCM is an easy to use package working with both Laravel for sending push notification with Firebase Cloud Messaging (FCM)

Installation
------------

[](#installation)

Use composer to install laravel fcm.

```
composer require irfanmumtaz/firebase-cloud-message
```

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

```
{
    "require": {
        "irfanmumtaz/firebase-cloud-message": "^0.1.1"
    }
}
```

### Laravel

[](#laravel)

Register the provider directly in your app configuration file config/app.php `config/app.php`:

```
'providers' => [
	// ...

	Irfanmumtaz\FirebaseCloudMessage\FCMServiceProvider::class,
]
```

Publish the package config file using the following command:

```
$ php artisan vendor:publish --provider="Irfanmumtaz\FirebaseCloudMessage\FCMServiceProvider"

```

Usage
-----

[](#usage)

```
use Irfanmumtaz\FirebaseCloudMessage\FirebaseCM;
use Irfanmumtaz\FirebaseCloudMessage\NotificationBuilder;

//create notification builder
$notification = new NotificationBuilder("Test notification");
$notification->setBody("test")
        ->tag('larvael');

/**
 * you can set other notification params
 * documentation here https://firebase.google.com/docs/cloud-messaging/http-server-ref
 * setBody(), setSound(), setBadge(), setClickAction(), setSubTitle(), setBodyLocKey(),
 * setBodyLocArgs(), setTitleLocKey(), setTitleLocArgs(), setAndroidChannelId(), setIcon(), setTag(),
 * setColor()
 */

//you can set option parameters
$notification->options->setCollapseKey("example")->setPriority("high");

/**
 * you can set other option params
 * documentation here https://firebase.google.com/docs/cloud-messaging/http-server-ref
 * setCollapseKey(), setPriority(), setContentAvailable(), setMutableContent(),
 * setTimeToLive(), setRestrictedPackageName(), setDryRun()
 *
 */

//custom data can be added in this way
$notification->custom->addData("key1", "value1")->addData("key2", "value2");

/**
 * Other usable functions in custom data
 * addData("key", "value") you can add custom data as many you want
 * removeData() remove all keys from custom data
 * unsetData("key1") remove a single key from custom data
 * getData() get complete custom data as array
 */

//create an object for FCM and pass notification while creating object
$fcm = new FirebaseCM($notification);
$fcm->setTo('firebase key')->send();
/**
 * Other FCM functions
 * setTo("key") uses for sending notification to a single user, pass token as string
 * setRegistrations(["key1", "key2"]) uses for sending notification to multiple users pass array of string
 * send() uses to send notificaiton
 */
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~132 days

Total

4

Last Release

893d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25830023?v=4)[Irfan Mumtaz](/maintainers/IrfanMumtaz)[@IrfanMumtaz](https://github.com/IrfanMumtaz)

---

Top Contributors

[![IrfanMumtaz](https://avatars.githubusercontent.com/u/25830023?v=4)](https://github.com/IrfanMumtaz "IrfanMumtaz (12 commits)")

### Embed Badge

![Health badge](/badges/irfanmumtaz-firebase-cloud-message/health.svg)

```
[![Health](https://phpackages.com/badges/irfanmumtaz-firebase-cloud-message/health.svg)](https://phpackages.com/packages/irfanmumtaz-firebase-cloud-message)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[guanguans/notify

Push notification SDK(AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NotifyX、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、ZohoCliq、ZohoCliqWebHook、Zulip).

687114.3k8](/packages/guanguans-notify)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

254168.5k](/packages/erag-laravel-disposable-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
