PHPackages                             mowahed/firebase-notification - 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. [API Development](/categories/api)
4. /
5. mowahed/firebase-notification

ActiveLibrary[API Development](/categories/api)

mowahed/firebase-notification
=============================

Laravel package for Firebase Cloud Messaging

2.0.2(7mo ago)6441MITPHPPHP &gt;=8.0 &lt;8.4

Since May 14Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/mowahed400/firebase-notification)[ Packagist](https://packagist.org/packages/mowahed/firebase-notification)[ RSS](/packages/mowahed-firebase-notification/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (12)Used By (0)

Firebase Notification Package for Laravel
=========================================

[](#firebase-notification-package-for-laravel)

A comprehensive Laravel package for sending Firebase Cloud Messaging (FCM) push notifications to devices, topics, and conditions.

Features
--------

[](#features)

- Send notifications to individual devices
- Send notifications to topics
- Subscribe/unsubscribe devices from topics
- Send notifications based on conditions
- Comprehensive error logging
- Support for all FCM features (images, sounds, deep links, etc.)

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

[](#installation)

1. Install via Composer:

```
composer require mowahed/firebase-notification:^2.0.2

php artisan vendor:publish --tag=firebase-config
```

### Add This in .env

[](#add-this-in-env)

```
FIREBASE_PROJECT_ID="your-project-id"
FIREBASE_CREDENTIALS="app/firebase/service-account-key.json"
FIREBASE_LOGGING_ENABLED="true"
FIREBASE_LOGGING_CHANNEL="firebase"
```

Add this in logging.php
-----------------------

[](#add-this-in-loggingphp)

```
 'channels' => [
    'firebase' => [
        'driver' => 'single',
        'path' => storage_path('logs/firebase.log'),
        'level' => 'error',
    ],
],
```

2. Send Notification to Device
------------------------------

[](#2-send-notification-to-device)

```
use Mowahed\FirebaseNotification\Facades\FirebaseNotification;

$response = FirebaseNotification::sendToDevice('device_fcm_token', [
    'title' => 'Welcome!',
    'body' => 'Thanks for installing our app!',
    'link' => 'https://yourapp.com',
    'sound' => 'default',
    'image' => 'https://example.com/notification.png',
    'priority' => 'high'
]);
```

3. Send Notification to Topic
-----------------------------

[](#3-send-notification-to-topic)

```
FirebaseNotification::sendToTopic('news,' [
    'title' => 'Breaking News',
    'body' => 'Something big just happened!',
    'link' => 'https://yourapp.com/news',
    'sound' => 'default'
]);
```

4. Subscribe Device to Topic
----------------------------

[](#4-subscribe-device-to-topic)

```
$response = FirebaseNotification::subscribeToTopic(
    ['device_token_1', 'device_token_2'],
    'news'
);
```

5. Send Notification to Condition
---------------------------------

[](#5-send-notification-to-condition)

```
$response = FirebaseNotification::sendToCondition(
    "'sports' in topics || 'news' in topics",
    [
        'title' => 'Sports News',
        'body' => 'Latest sports updates!',
        'link' => 'https://yourapp.com/sports'
    ]
);
```

6. Unsubscribe Device from Topic
--------------------------------

[](#6-unsubscribe-device-from-topic)

```
$response = FirebaseNotification::unsubscribeFromTopic(
    ['device_token_1', 'device_token_2'],
    'news'
);
```

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance62

Regular maintenance activity

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 70.8% 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 ~20 days

Recently: every ~44 days

Total

10

Last Release

237d ago

Major Versions

v1.0.7 → 2.0.02025-05-16

PHP version history (2 changes)v1.0.0PHP ^8.0

v1.0.1PHP &gt;=8.0 &lt;8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/60117806?v=4)[mohamed \_wahed](/maintainers/mowahed400)[@mowahed400](https://github.com/mowahed400)

---

Top Contributors

[![mowahed400](https://avatars.githubusercontent.com/u/60117806?v=4)](https://github.com/mowahed400 "mowahed400 (17 commits)")[![mohamed-wahed0](https://avatars.githubusercontent.com/u/160743954?v=4)](https://github.com/mohamed-wahed0 "mohamed-wahed0 (7 commits)")

### Embed Badge

![Health badge](/badges/mowahed-firebase-notification/health.svg)

```
[![Health](https://phpackages.com/badges/mowahed-firebase-notification/health.svg)](https://phpackages.com/packages/mowahed-firebase-notification)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.6M986](/packages/statamic-cms)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

3.0k37.6M134](/packages/darkaonline-l5-swagger)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k14.2M63](/packages/knuckleswtf-scribe)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

783.8k](/packages/scriptdevelop-whatsapp-manager)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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