PHPackages                             nean/laravel-fcm-notification-channel - 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. nean/laravel-fcm-notification-channel

ActiveLibrary

nean/laravel-fcm-notification-channel
=====================================

Firebase Cloud Messages Notification Driver

2.0.1(6y ago)0125MITPHPPHP ^7.1

Since Dec 20Pushed 6y agoCompare

[ Source](https://github.com/nean/laravel-fcm-notification-channel)[ Packagist](https://packagist.org/packages/nean/laravel-fcm-notification-channel)[ Docs](https://github.com/nean/laravel-fcm-notification-channel)[ RSS](/packages/nean-laravel-fcm-notification-channel/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (7)Versions (7)Used By (0)

FCM notification channel for Laravel 5.8+
=========================================

[](#fcm-notification-channel-for-laravel-58)

This package makes it easy to send notifications using [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging/) (FCM) with Laravel 5.8 and above. This package is based on [brozot/laravel-fcm](https://github.com/brozot/Laravel-FCM), so please read that documentation for more information.

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Available message types](#available-message-types)
    - [Available message methods](#available-message-methods)
- [Testing](#testing)
- [Credits](#credits)
- [Support](#support)
- [License](#license)

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

[](#installation)

You can install this package via composer:

```
composer require nean/laravel-fcm-notification-channel:^2
```

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use NotificationChannels\FCM\FCMMessage;
use Illuminate\Notifications\Notification;

class ExampleNotification extends Notification
{
    public function via($notifiable)
    {
        return ['fcm'];
    }

    public function toFCM($notifiable)
    {
        return (new FCMMessage())
            ->notification([
                'title' => 'Notification title',
                'body' => 'Notification body',
            ]);
    }
}
```

### Available message types:

[](#available-message-types)

- `FCMMessage`: Send notifications to device(s).
- `FCMMessageTopic`: Send notifications to topic(s).
- `FCMMessageGroup`: Send notifications to group(s).

In order for your notice to know who to send messages, you must add `routeNotificationForFCM` method to your notification model.

### Available message methods

[](#available-message-methods)

- `data()`: Notification data. `array` | `LaravelFCM\Message\PayloadData` | `LaravelFCM\Message\PayloadDataBuilder`
- `options()`: Notification options. `array` | `LaravelFCM\Message\Options` | `LaravelFCM\Message\OptionsBuilder`
- `notification()`: Notification content. `array` | `LaravelFCM\Message\PayloadNotification` | `LaravelFCM\Message\PayloadNotificationBuilder`

### Proxy methods. See [brozot/laravel-fcm](https://github.com/brozot/Laravel-FCM) for more information about this methods.

[](#proxy-methods-see-brozotlaravel-fcm-for-more-information-about-this-methods)

- `setDryRun`
- `setPriority`
- `setTimeToLive`
- `setCollapseKey`
- `setDelayWhileIdle`
- `setMutableContent`
- `setContentAvailable`
- `setRestrictedPackageName`
- `isDryRun`
- `getPriority`
- `getTimeToLive`
- `getCollapseKey`
- `isDelayWhileIdle`
- `isMutableContent`
- `isContentAvailable`
- `getRestrictedPackageName`
- `setTag`
- `setBody`
- `setIcon`
- `setTitle`
- `setSound`
- `setBadge`
- `setColor`
- `setChannelId`
- `setClickAction`
- `setBodyLocationKey`
- `setBodyLocationArgs`
- `setTitleLocationKey`
- `setTitleLocationArgs`
- `getTag`
- `getBody`
- `getIcon`
- `getTitle`
- `getSound`
- `getBadge`
- `getColor`
- `getChannelId`
- `getClickAction`
- `getBodyLocationKey`
- `getBodyLocationArgs`
- `getTitleLocationKey`
- `getTitleLocationArgs`

Testing
-------

[](#testing)

```
$ composer test
```

Credits
-------

[](#credits)

- [Neranjen](https://github.com/nean)
- [Evgeni Razumov](https://github.com/enniel)
- [All Contributors](../../contributors)

Support
-------

[](#support)

Having trouble? Open an issue!

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 51.4% 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 ~231 days

Recently: every ~204 days

Total

6

Last Release

2276d ago

Major Versions

0.2.0 → 1.0.02019-11-19

1.0.0 → 2.0.02020-02-18

PHP version history (2 changes)0.0.1PHP &gt;=5.5.9

1.0.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1152319?v=4)[nean](/maintainers/nean)[@nean](https://github.com/nean)

---

Top Contributors

[![nean](https://avatars.githubusercontent.com/u/1152319?v=4)](https://github.com/nean "nean (18 commits)")[![enniel](https://avatars.githubusercontent.com/u/19760944?v=4)](https://github.com/enniel "enniel (15 commits)")[![tssujt](https://avatars.githubusercontent.com/u/17313425?v=4)](https://github.com/tssujt "tssujt (1 commits)")[![yuesh](https://avatars.githubusercontent.com/u/12636087?v=4)](https://github.com/yuesh "yuesh (1 commits)")

---

Tags

firebaseFCM

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/nean-laravel-fcm-notification-channel/health.svg)

```
[![Health](https://phpackages.com/badges/nean-laravel-fcm-notification-channel/health.svg)](https://phpackages.com/packages/nean-laravel-fcm-notification-channel)
```

###  Alternatives

[kreait/laravel-firebase

A Laravel package for the Firebase PHP Admin SDK

1.3k16.5M42](/packages/kreait-laravel-firebase)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[benwilkins/laravel-fcm-notification

Laravel FCM (Firebase Cloud Messaging) Notification Channel

210964.1k1](/packages/benwilkins-laravel-fcm-notification)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)[laravel-notification-channels/pusher-push-notifications

Pusher native Push Notifications driver.

282733.2k1](/packages/laravel-notification-channels-pusher-push-notifications)[spatie/laravel-backup-server

Backup multiple applications

17016.7k1](/packages/spatie-laravel-backup-server)

PHPackages © 2026

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