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

ActiveLibrary[API Development](/categories/api)

codecovevienna/larafirebase
===========================

Laravel Firebase Cloud Messaging.

1.11.0(2mo ago)0132MITPHPPHP ^8.3

Since Mar 30Pushed 2mo agoCompare

[ Source](https://github.com/codecovevienna/larafirebase)[ Packagist](https://packagist.org/packages/codecovevienna/larafirebase)[ Docs](https://github.com/codecovevienna/larafirebase)[ RSS](/packages/codecovevienna-larafirebase/feed)WikiDiscussions main Synced today

READMEChangelog (7)Dependencies (9)Versions (11)Used By (0)

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

 [ ![Total Downloads](https://camo.githubusercontent.com/609df0034adcb4538cb5a0b518a4ad0846d353cd3feda39d5fc8d294eb651879/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6465636f76657669656e6e612f6c6172616669726562617365) ](https://packagist.org/packages/codecovevienna/larafirebase) [ ![Latest Stable Version](https://camo.githubusercontent.com/a03cefaa8d206f826e688ffb59e86d5baa4ea48a12d82470f88a03c690d02371/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f6465636f76657669656e6e612f6c6172616669726562617365) ](https://packagist.org/packages/codecovevienna/larafirebase) [ ![License](https://camo.githubusercontent.com/724c043e4eea2aab05751e66c709110bfbe97e23934fd35af71813b035bd6f3a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f636f6465636f76657669656e6e612f6c6172616669726562617365) ](https://packagist.org/packages/codecovevienna/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 codecovevienna/larafirebase

```

**Copy Configuration**

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

```
php artisan vendor:publish --provider="CodeCoveVienna\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 CodeCoveVienna\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 CodeCoveVienna\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

44

—

FairBetter than 90% of packages

Maintenance86

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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 ~55 days

Recently: every ~96 days

Total

8

Last Release

74d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7916fc43c2262264b1a42d92709f03c7f3f731513fbf262cd33701d530abfb9b?d=identicon)[matthiaseigner](/maintainers/matthiaseigner)

---

Top Contributors

[![gentritabazi](https://avatars.githubusercontent.com/u/35135482?v=4)](https://github.com/gentritabazi "gentritabazi (13 commits)")[![Sepix](https://avatars.githubusercontent.com/u/21076537?v=4)](https://github.com/Sepix "Sepix (7 commits)")[![matthiaseigner](https://avatars.githubusercontent.com/u/22048059?v=4)](https://github.com/matthiaseigner "matthiaseigner (3 commits)")[![gimmixAT](https://avatars.githubusercontent.com/u/1855152?v=4)](https://github.com/gimmixAT "gimmixAT (1 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/codecovevienna-larafirebase/health.svg)

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

###  Alternatives

[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M146](/packages/laravel-cashier)[spatie/laravel-health

Monitor the health of a Laravel application

87512.0M165](/packages/spatie-laravel-health)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)

PHPackages © 2026

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