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

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

rendyfutsuy/my-fcm
==================

A simple package that help you send a Firebase notification with your Laravel applications.

0.3(5y ago)04MITPHPPHP ^7.0

Since Sep 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/rendyfutsuy/my-fcm)[ Packagist](https://packagist.org/packages/rendyfutsuy/my-fcm)[ RSS](/packages/rendyfutsuy-my-fcm/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Laravel FCM
===========

[](#laravel-fcm)

A simple package that help you send a Firebase notification with your Laravel applications

### Installation

[](#installation)

You can pull the package via composer :

```
$ composer require rendyfutsuy/my-fcm
```

#### Laravel

[](#laravel)

You must register the service provider :

```
// config/app.php

'Providers' => [
   // ...
   Angga\Fcm\FcmServiceProvider::class,
]
```

If you want to make use of the facade you must install it as well :

```
// config/app.php

'aliases' => [
    // ...
    'Fcm' => Angga\Fcm\FcmFacade::class,
];
```

Next, You must publish the config file to define your FCM server key :

```
php artisan vendor:publish --provider="Angga\Fcm\FcmServiceProvider"
```

This is the contents of the published file :

```
return [

    /**
     * Set your FCM Server Key
     * Change to yours
     */

    'server_key' => env('FCM_SERVER_KEY', ''),

];
```

#### Lumen

[](#lumen)

Add the following service provider to the `bootstrap/app.php` file

```
$app->register(Angga\Fcm\FcmServiceProvider::class);
```

Also copy the [my-fcm.php](https://github.com/futsuy/my-fcm/blob/master/resources/config/my-fcm.php) config file to `config/my-fcm.php`

Add the configuration to the `bootstrap/app.php` file *Important:* this needs to be before the registration of the service provider

```
$app->configure('my-fcm');
...
$app->register(Angga\Fcm\FcmServiceProvider::class);
```

Set your FCM Server Key in `.env` file :

```
APP_NAME="Laravel"
# ...
FCM_SERVER_KEY=putYourKeyHere

```

### Usage

[](#usage)

If You want to send a FCM with just notification parameter, this is an example of usage sending a FCM with only data parameter :

```
$recipients = [
    'clKMv.......',
    'GxQQW.......',
];

fcm()
    ->to($recipients)
    ->priority('high')
    ->timeToLive(0)
    ->data([
        'title' => 'Test FCM',
        'body' => 'This is a test of FCM',
    ])
    ->send();
```

If You want to send a FCM to topic, use method toTopic($topic) instead to() :

```
fcm()
    ->toTopic($topic) // $topic must an string (topic name)
    ->priority('normal')
    ->timeToLive(0)
    ->notification([
        'title' => 'Test FCM',
        'body' => 'This is a test of FCM',
    ])
    ->send();
```

If You want to send a FCM with just notification parameter, this is an example of usage sending a FCM with only notification parameter :

```
fcm()
    ->to($recipients) // $recipients must an array
    ->priority('high')
    ->timeToLive(0)
    ->notification([
        'title' => 'Test FCM',
        'body' => 'This is a test of FCM',
    ])
    ->send();
```

If You want to send a FCM with both data &amp; notification parameter, this is an example of usage sending a FCM with both data &amp; notification parameter :

```
fcm()
    ->to($recipients) // $recipients must an array
    ->priority('normal')
    ->timeToLive(0)
    ->data([
        'title' => 'Test FCM',
        'body' => 'This is a test of FCM',
    ])
    ->notification([
        'title' => 'Test FCM',
        'body' => 'This is a test of FCM',
    ])
    ->send();
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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

Total

3

Last Release

2063d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22336340?v=4)[Rendy Anggara](/maintainers/rendyfutsuy)[@rendyfutsuy](https://github.com/rendyfutsuy)

---

Top Contributors

[![rendyfutsuy](https://avatars.githubusercontent.com/u/22336340?v=4)](https://github.com/rendyfutsuy "rendyfutsuy (10 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/rendyfutsuy-my-fcm/health.svg)](https://phpackages.com/packages/rendyfutsuy-my-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)
