PHPackages                             muhbayu/laravel-firebase-cloud-messaging - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. muhbayu/laravel-firebase-cloud-messaging

ActiveLibrary[HTTP &amp; Networking](/categories/http)

muhbayu/laravel-firebase-cloud-messaging
========================================

Package Firebase Cloud Messaging for Laravel/Lumen

00PHP

Since Dec 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/MuhBayu/laravel-firebase-cloud-messaging)[ Packagist](https://packagist.org/packages/muhbayu/laravel-firebase-cloud-messaging)[ RSS](/packages/muhbayu-laravel-firebase-cloud-messaging/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Firebase Cloud Messaging
================================

[](#laravel-firebase-cloud-messaging)

Instalation
-----------

[](#instalation)

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

```
$ composer require muhbayu\laravel-firebase-cloud-messaging
```

### Laravel

[](#laravel)

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

```
'providers' => [
	 // ...
	 MuhBayu\Fcm\FcmServiceProvider::class,
]
```

Publish the package config file using the following command:

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

### Lumen

[](#lumen)

Register the provider in your bootstrap app file `boostrap/app.php`Add the following line in the "Register Service Providers" section at the bottom of the file:

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

### Package Configuration

[](#package-configuration)

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

```
FCM_LEGACY_KEY=
FCM_SENDER_ID=
```

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

[](#basic-usage)

The following use statements are required for the examples below:

```
use MuhBayu\Fcm;
```

#### Sending Push Notification

[](#sending-push-notification)

```
// if you want to send multiple $recipients token must an array
Fcm::to($recipients)->notification([
	'title' => 'Title Message',
	'body' => 'This is a body message of FCM',
	'click_action' => 'http://yourdomain.com', // optional
	'icon' => 'your_icon', //optional
])->send();
```

If You want to send a FCM to topic, use method

```
->topic('/topic/name')
```

#### Notification with Extra Data

[](#notification-with-extra-data)

If you want to send a FCM with data &amp; notification parameter, you must use extra method :

```
Fcm::to($recipients)->notification([
	// ...
])->extra([
	'name' => 'Name Data',
	'data' => 'Data test',
])->send();
```

#### Simple Usage

[](#simple-usage)

```
fcm()->send($notification, $data);
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d14aa59853cb111377e0a4ef60bf56db6e90e517efc01234da263bc1350fe819?d=identicon)[mbn12](/maintainers/mbn12)

### Embed Badge

![Health badge](/badges/muhbayu-laravel-firebase-cloud-messaging/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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