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 2w ago

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://avatars.githubusercontent.com/u/16985012?v=4)[Muhammad Bayu Nugraha](/maintainers/mbn12)[@mbn12](https://github.com/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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M81](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M85](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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