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

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

medianet-dev/fcm
================

Laravel package for Firebase Cloud Messaging

1.0.0(2y ago)03MITPHPPHP &gt;=7.0

Since Jan 31Pushed 2y agoCompare

[ Source](https://github.com/Medianet-Tunisia/fcm)[ Packagist](https://packagist.org/packages/medianet-dev/fcm)[ RSS](/packages/medianet-dev-fcm/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (7)Versions (2)Used By (0)

Medianet-FCM
============

[](#medianet-fcm)

[![License](https://camo.githubusercontent.com/b60009c61d12b84b2536d6424619974997684fcc36e8a9a41d1ca40694aea2d9/68747470733a2f2f706f7365722e707567782e6f72672f62726f7a6f742f6c61726176656c2d66636d2f6c6963656e7365)](https://packagist.org/packages/medianet-dev/fcm)

Introduction
------------

[](#introduction)

Medianet-FCM is an easy to use package working with both Laravel for sending push notification with [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/) (FCM) and huawei store.

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

[](#installation)

To get the latest version of Medianet-FCM on your project, require it from "composer":

```
$ composer require medianet-dev/fcm

```

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

```
{
    "require": {
        "medianet-dev/fcm": "^1.0"
    }
}
```

### Publish package

[](#publish-package)

Publish the package config file using the following command: $ php artisan vendor:publish --provider="MedianetFCM\\FCMServiceProvider"

### Package Configuration

[](#package-configuration)

In your `.env` file, add the server key and the secret key for the Firebase Cloud Messaging:

```
# FCM Log
FCM_LOG=true
# URL path for the images
FCM_IMAGE_UPLOAD_URL="http://localhost/fcm/public/uploads"
# Firebase KEYS
FCM_SERVER_KEY="my_secret_server_key"
FCM_SENDER_ID="my_secret_sender_id"
# Huawei KEYS
HUAWEI_APP_ID="my_secret_server_key"
HUAWEI_APP_SECRET="my_secret_sender_id"
# Notifiable model
FCM_MODEL="App\Models\User"
FCM_USER_ID="id"
```

To get these keys, you must create a new application on the [firebase cloud messaging console](https://console.firebase.google.com/).

After the creation of your application on Firebase, you can find keys in `project settings -> cloud messaging`.

For the huawei app keys you need to get them from the Huawei Store

Basic Usage
-----------

[](#basic-usage)

To send the notification for

```
$notificationService = new PushNotificationService();

$users = config('fcm.notifiable.model')::get();

$notificationService->send($users, [
	'title' => 'title',
	'description' => 'description'
]);
```

API Documentation
-----------------

[](#api-documentation)

You can find more documentation about the API in the [API reference](./doc/Readme.md).

Licence
-------

[](#licence)

This library is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

Some of this documentation is coming from the official documentation. You can find it completely on the [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/) Website.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

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

Unknown

Total

1

Last Release

828d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/38753b0be71842a95f9d64620c2de4aa5090ae079110e51840c8324fc7a5849b?d=identicon)[MaherMehri](/maintainers/MaherMehri)

---

Top Contributors

[![medianet-dev](https://avatars.githubusercontent.com/u/57226389?v=4)](https://github.com/medianet-dev "medianet-dev (3 commits)")

---

Tags

laravelpushnotificationfirebaseFCMFirebase Cloud Messaging

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

PHPackages © 2026

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