PHPackages                             digimantra/digi-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. [Mail &amp; Notifications](/categories/mail)
4. /
5. digimantra/digi-notification

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

digimantra/digi-notification
============================

A Laravel package to send FCM push notification.

v1.0.2(1y ago)010MITPHP

Since Sep 20Pushed 1y agoCompare

[ Source](https://github.com/digimantra/digi-notification)[ Packagist](https://packagist.org/packages/digimantra/digi-notification)[ RSS](/packages/digimantra-digi-notification/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (5)Used By (0)

Laravel FCM Notifications Package
=================================

[](#laravel-fcm-notifications-package)

[![Packagist Version](https://camo.githubusercontent.com/a11c69274c45b9d0160720c914a53699b38d4cb82d6c27a0cd289fbf36ed2187/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646967696d616e7472612f646967692d6e6f74696669636174696f6e)](https://camo.githubusercontent.com/a11c69274c45b9d0160720c914a53699b38d4cb82d6c27a0cd289fbf36ed2187/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646967696d616e7472612f646967692d6e6f74696669636174696f6e)[![Packagist Downloads](https://camo.githubusercontent.com/7cd002f429b00f28a5e53ef504e71e0157f31095a6b80c00cfcd550993201533/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646967696d616e7472612f646967692d6e6f74696669636174696f6e)](https://camo.githubusercontent.com/7cd002f429b00f28a5e53ef504e71e0157f31095a6b80c00cfcd550993201533/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646967696d616e7472612f646967692d6e6f74696669636174696f6e)[![GitHub License](https://camo.githubusercontent.com/90ef4193cb304880528dd10f61c012f7218293b1c52c329d4b9613f53c086be4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646967696d616e7472612f646967692d6e6f74696669636174696f6e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/90ef4193cb304880528dd10f61c012f7218293b1c52c329d4b9613f53c086be4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646967696d616e7472612f646967692d6e6f74696669636174696f6e3f7374796c653d666c61742d737175617265)

This package provides an easy way to send Firebase Cloud Messaging (FCM) push notifications in Laravel applications using Google's Firebase API.

Table of Contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Configuration](#configuration)
- [Logging](#logging)
- [Known Issues](#known-issues)
- [License](#license)
- [Support](#support)

Requirements
------------

[](#requirements)

- Laravel 8, 9, or 10
- PHP 8.0 or higher
- Google API Client (installed automatically via composer)
- Firebase account with Cloud Messaging API enabled

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

[](#installation)

1. **Install via Composer**

    ```
    composer require digimantra/digi-notification
    ```
2. **Publish Configuration**

    ```
    php artisan vendor:publish --tag=config --provider="DigiNotification\FcmHelper\FcmServiceProvider"
    ```
3. **Set Up Environment Variables**

    Add the following to your `.env` file:

    ```
    FIREBASE_PROJECT_ID=your-firebase-project-id
    FIREBASE_CREDENTIALS=path/to/your/credentials.json
    ```

    You can generate the credentials file from the [Firebase Console](https://console.firebase.google.com/).

Usage
-----

[](#usage)

### Sending FCM Notifications:

[](#sending-fcm-notifications)

```
### Use Namespaces
use DigiNotification\FcmHelper\FcmHelper;

### Assigning variables
$tokens = ['device_token_1', 'device_token_2']; // Array of device tokens to which the notification will be sent.
$title = 'New Notification'; // The title of the notification.
$body = 'This is the body of the notification'; // The body content of the notification.
$data = ['key' => 'value']; // (Optional) Additional custom data.

### Example Send FCM notificaiton Dispatch
FcmHelper::sendFcmNotification($tokens, $title, $body, $data);
```

Configuration
-------------

[](#configuration)

### Queue Configuration

[](#queue-configuration)

```
Ensure your queue system is set up properly by adding the following to your `.env` file:

```

### env

[](#env)

```
QUEUE_CONNECTION=database

```

### Then, create the `jobs` table and run the migration:

[](#then-create-the-jobs-table-and-run-the-migration)

```
php artisan queue:table
php artisan migrate

```

Logging
-------

[](#logging)

### To enable logging, add this to your `.env` file:

[](#to-enable-logging-add-this-to-your-env-file)

```
FCM_LOGGING=true
Set to false to disable logging.

```

Known Issues
------------

[](#known-issues)

```
Ensure FCM tokens are valid, as invalid tokens might cause delivery failures.
Invalid service account credentials will cause the package to fail to obtain an access token from Firebase.

```

License
-------

[](#license)

```
This package is open-sourced under the MIT license.

```

Support
-------

[](#support)

```
For support or more details you can reach out at it@digimantra.com.

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Total

3

Last Release

591d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b0915329748e0b3b6062e1a0110cd94552cd90313a133a087510813a6734fb92?d=identicon)[hs-dml](/maintainers/hs-dml)

---

Top Contributors

[![Onkar-php-digi](https://avatars.githubusercontent.com/u/112922041?v=4)](https://github.com/Onkar-php-digi "Onkar-php-digi (28 commits)")

### Embed Badge

![Health badge](/badges/digimantra-digi-notification/health.svg)

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

###  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.1M390](/packages/illuminate-mail)

PHPackages © 2026

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