PHPackages                             elmogy/fcm - 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. elmogy/fcm

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

elmogy/fcm
==========

A Laravel package for FCM (Firebase Cloud Messaging) integration.

v1.4(1y ago)333MITPHPPHP &gt;=8.0

Since Dec 24Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/karim-Elmogy/Laravel-FCM)[ Packagist](https://packagist.org/packages/elmogy/fcm)[ RSS](/packages/elmogy-fcm/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

[![alt tag](https://camo.githubusercontent.com/b5a3cb18a9aa548fb6909ee155b11ac4a47af8bee531e1ee9e0add06b287b36c/68747470733a2f2f7777772e677374617469632e636f6d2f64657672656c2d646576736974652f70726f642f76356162366664306164396330326231333162346433383762353735316163326333363136343738633664643635623565393331663038303565666131303039632f66697265626173652f696d616765732f6c6f636b75702e737667)](https://camo.githubusercontent.com/b5a3cb18a9aa548fb6909ee155b11ac4a47af8bee531e1ee9e0add06b287b36c/68747470733a2f2f7777772e677374617469632e636f6d2f64657672656c2d646576736974652f70726f642f76356162366664306164396330326231333162346433383762353735316163326333363136343738633664643635623565393331663038303565666131303039632f66697265626173652f696d616765732f6c6f636b75702e737667)

elmogy/fcm
==========

[](#elmogyfcm)

A Laravel package for FCM (Firebase Cloud Messaging) integration .

Features
========

[](#features)

- Easy integration with Laravel applications

**Requirements**

- PHP 8.0
- apiclient ^2.0

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

[](#installation)

```
composer require elmogy/fcm
```

**Configuration:**

```
# Elmogy Fcm Configuration for Production Environment (.env)
FIREBASE_PROJECT_ID=YOUR_PROJECT_ID
FIREBASE_FILE=FIREBASE_FILE

```

Instantiating FCM Class
-----------------------

[](#instantiating-fcm-class)

To begin using the FCM functionality, you need to instantiate the `elmogy/fcm` class. Follow these steps:

### Step 1: Import FCM Class

[](#step-1-import-fcm-class)

Before you can create an instance of the `elmogy/fcm` class, ensure that you import it into your PHP file using the `use` statement:

```
use elmogy\fcm\FCMService;
```

### Step 2: Instantiate FCM Class

[](#step-2-instantiate-fcm-class)

Once the class is imported, you can instantiate it using the following code:

```
 $fcmService = new FCMService();
```

This creates an instance of the FCM class, allowing you to utilize its methods and properties for handling FCM within your Laravel application.

How to use :
============

[](#how-to-use-)

1 - checkout &amp; session
--------------------------

[](#1---checkout--session)

- Create session :

```
    use elmogy\fcm\FCMService;

    $fcmService = new FCMService();

    $fcmToken = "DEVICE_TOKEN"; // Replace with the actual FCM token
    $title    = "Test Notification";
    $body     = "This is a test message.";
    $icon     = "/default.png"; // Optional
    $data     = ['key' => 'value'] ; // Optional

    $response = $fcmService->sendFCM($fcmToken, $title, $body , $icon ,$data);

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance56

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 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 ~29 days

Total

5

Last Release

385d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/50c6353e8c5920c7eebb2e8974a22ac7e0a9eb762c2dfe0b263a6513004af337?d=identicon)[karim\_elmogy](/maintainers/karim_elmogy)

---

Top Contributors

[![karim-Elmogy](https://avatars.githubusercontent.com/u/55699823?v=4)](https://github.com/karim-Elmogy "karim-Elmogy (30 commits)")

### Embed Badge

![Health badge](/badges/elmogy-fcm/health.svg)

```
[![Health](https://phpackages.com/badges/elmogy-fcm/health.svg)](https://phpackages.com/packages/elmogy-fcm)
```

###  Alternatives

[mckenziearts/laravel-notify

Flexible flash notifications for Laravel

1.7k1.1M5](/packages/mckenziearts-laravel-notify)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[laravel-notification-channels/apn

Apple APN Push Notification Channel

2021.9M4](/packages/laravel-notification-channels-apn)[laravel-notification-channels/microsoft-teams

A Laravel Notification Channel for Microsoft Teams

1603.0M7](/packages/laravel-notification-channels-microsoft-teams)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[illuminate/mail

The Illuminate Mail package.

5910.1M391](/packages/illuminate-mail)

PHPackages © 2026

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