PHPackages                             gg-innovative/larafirebase - 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. gg-innovative/larafirebase

ActiveLibrary

gg-innovative/larafirebase
==========================

Laravel Firebase Cloud Messaging.

1.0.5(1y ago)2085.5k↓23.1%11[4 issues](https://github.com/gg-innovative/larafirebase/issues)MITPHP

Since Nov 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/gg-innovative/larafirebase)[ Packagist](https://packagist.org/packages/gg-innovative/larafirebase)[ Docs](https://github.com/gg-innovative/larafirebase)[ RSS](/packages/gg-innovative-larafirebase/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (3)Versions (8)Used By (0)

[![](/art/cover-v2.png)](/art/cover-v2.png)

 [ ![Total Downloads](https://camo.githubusercontent.com/ab0c0e4e9e4a8c8e3be2738a18359684a31d983757ee4dd60bfeb966f1192731/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67672d696e6e6f7661746976652f6c6172616669726562617365) ](https://packagist.org/packages/gg-innovative/larafirebase) [ ![Latest Stable Version](https://camo.githubusercontent.com/60172be99f2d60e4f1ad5a3148e83011b86c6550611c26874ab93e1f33065d24/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67672d696e6e6f7661746976652f6c6172616669726562617365) ](https://packagist.org/packages/gg-innovative/larafirebase) [ ![License](https://camo.githubusercontent.com/09442a50a1fb01535e6e5e0b180816556fb2b1eb47722e321d1b83841972e9a7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67672d696e6e6f7661746976652f6c6172616669726562617365) ](https://packagist.org/packages/gg-innovative/larafirebase)

### Introduction

[](#introduction)

**Larafirebase** is a package thats offers you to send push notifications via Firebase in Laravel.

Firebase Cloud Messaging (FCM) is a cross-platform messaging solution that lets you reliably deliver messages at no cost.

For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.

### Installation

[](#installation)

Follow the steps below to install the package.

**Install via Composer**

```
composer require gg-innovative/larafirebase

```

**Copy Configuration**

Run the following command to publish the `larafirebase.php` config file:

```
php artisan vendor:publish --provider="GGInnovative\Larafirebase\Providers\LarafirebaseServiceProvider"
```

**Configure larafirebase.php as needed**

Open the `larafirebase.php` configuration file, which you just published, and set the following values as needed:

- `project_id`: Replace with your actual Firebase project ID.
- `firebase_credentials`: This refers to the JSON credentials file for your Firebase project. Make sure it points to the correct location in your project. This JSON file contains the authentication information for your Firebase project, allowing your Laravel application to interact with Firebase services. You can generate this JSON file in the Firebase Console. Once you have it, specify its path in this configuration.

### Usage

[](#usage)

Follow the steps below to find how to use the package.

Example usage in any class you want to use Larafirebase:

```
use GGInnovative\Larafirebase\Facades\Larafirebase;

class MyController
{
    public function sendNotification()
    {
        return Larafirebase::withTitle('Hello World')
            ->withBody('I have something new to share with you!')
            ->withImage('https://firebase.google.com/images/social.png')
            ->withAdditionalData([
                'name' => 'wrench',
                'mass' => '1.3kg',
                'count' => '3'
            ])
            ->withToken('TOKEN_HERE') // You can use also withTopic
            ->sendNotification();

        // Or
        return Larafirebase::fromRaw([
            // https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages
            "name" => "string",
            "data" => [
                "string" => "string",
            ],
            "notification" => [
                "object" => "(Notification)"
            ],
            "android" => [
                "object" => "(AndroidConfig)"
            ],
            "webpush" => [
                "object" => "(WebpushConfig)",
            ],
            "apns" => [
                "object" => "(ApnsConfig)"
            ],
            "fcm_options" => [
                "object" => "(FcmOptions)"
            ],
            "token" => "string",
            "topic" => "string",
            "condition" => "string"
        ])->sendNotification();
    }
}
```

Example usage in **Notification** class:

```
use Illuminate\Notifications\Notification;
use GGInnovative\Larafirebase\Messages\FirebaseMessage;

class SendBirthdayReminder extends Notification
{
    /**
     * Get the notification's delivery channels.
     */
    public function via($notifiable)
    {
        return ['firebase'];
    }

    /**
     * Get the firebase representation of the notification.
     */
    public function toFirebase($notifiable)
    {
        return (new FirebaseMessage)
            ->withTitle('Hey, ', $notifiable->first_name)
            ->withBody('Happy Birthday!')
            ->withToken('TOKEN_HERE')
            ->asNotification();
    }
}
```

### Tips

[](#tips)

- You can use `larafirebase()` helper instead of Facade.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance44

Moderate activity, may be stable

Popularity43

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 78.9% 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 ~109 days

Recently: every ~136 days

Total

6

Last Release

380d ago

### Community

Maintainers

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

---

Top Contributors

[![gentritabazi](https://avatars.githubusercontent.com/u/35135482?v=4)](https://github.com/gentritabazi "gentritabazi (15 commits)")[![Sepix](https://avatars.githubusercontent.com/u/21076537?v=4)](https://github.com/Sepix "Sepix (2 commits)")[![HarmJan1990](https://avatars.githubusercontent.com/u/22013950?v=4)](https://github.com/HarmJan1990 "HarmJan1990 (1 commits)")[![muhamedRadwan](https://avatars.githubusercontent.com/u/16479089?v=4)](https://github.com/muhamedRadwan "muhamedRadwan (1 commits)")

### Embed Badge

![Health badge](/badges/gg-innovative-larafirebase/health.svg)

```
[![Health](https://phpackages.com/badges/gg-innovative-larafirebase/health.svg)](https://phpackages.com/packages/gg-innovative-larafirebase)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

86910.0M83](/packages/spatie-laravel-health)[laravel-notification-channels/telegram

Telegram Notifications Channel for Laravel

1.1k3.4M35](/packages/laravel-notification-channels-telegram)[s-ichikawa/laravel-sendgrid-driver

This library adds a 'sendgrid' mail driver to Laravel.

4139.3M1](/packages/s-ichikawa-laravel-sendgrid-driver)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[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)

PHPackages © 2026

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