PHPackages                             alfa6661/laravel-firebase - 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. alfa6661/laravel-firebase

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

alfa6661/laravel-firebase
=========================

Firebase notification for laravel 5.2

2.1.1(8y ago)93.5k11[1 PRs](https://github.com/alfa6661/laravel-firebase/pulls)MITPHPPHP &gt;=5.6.4

Since Aug 29Pushed 6y ago2 watchersCompare

[ Source](https://github.com/alfa6661/laravel-firebase)[ Packagist](https://packagist.org/packages/alfa6661/laravel-firebase)[ Docs](https://github.com/alfa6661/laravel-firebase)[ RSS](/packages/alfa6661-laravel-firebase/feed)WikiDiscussions master Synced 1mo ago

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

laravel-firebase
================

[](#laravel-firebase)

[![StyleCI](https://camo.githubusercontent.com/65e05317a95915ea61f72e63fd39e41a0934ff44d27319d0a3360528a8895522/68747470733a2f2f7374796c6563692e696f2f7265706f732f36363533393839332f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/66539893)[![Total Downloads](https://camo.githubusercontent.com/45720dc0c7f171d378acc109d0b56be49acfffe544da38744bb6ab237a59d244/68747470733a2f2f706f7365722e707567782e6f72672f616c6661363636312f6c61726176656c2d66697265626173652f646f776e6c6f616473)](https://packagist.org/packages/alfa6661/laravel-firebase)[![Latest Stable Version](https://camo.githubusercontent.com/f8744ede5d7a18ba45b6572d06c9ea8d7f32aaab098ddb361f761672cd7e625d/68747470733a2f2f706f7365722e707567782e6f72672f616c6661363636312f6c61726176656c2d66697265626173652f762f737461626c65)](https://packagist.org/packages/alfa6661/laravel-firebase)[![Latest Unstable Version](https://camo.githubusercontent.com/4c55ff3a3ead203cb22f18a930c569d619a0d332e87aed45891ead1f87c0fb57/68747470733a2f2f706f7365722e707567782e6f72672f616c6661363636312f6c61726176656c2d66697265626173652f762f756e737461626c65)](https://packagist.org/packages/alfa6661/laravel-firebase)

Google Firebase Notification for Laravel

This package makes it easy to send Firebase Notification with Laravel

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

[](#installation)

You can install the package via composer:

```
composer require alfa6661/laravel-firebase
```

You must install the service provider:

```
// config/app.php
'providers' => [
    ...
    Alfa6661\Firebase\FirebaseServiceProvider::class,
],
```

### Setting up your Firebase account

[](#setting-up-your-firebase-account)

Add your Firebase Key to your `config/services.php`:

```
// config/services.php
...
'firebase' => [
    'api_key' => env('FIREBASE_API_KEY'),
],
...
```

Usage
-----

[](#usage)

Now you can use the channel in your `via()` method inside the notification:

```
use Alfa6661\Firebase\FirebaseChannel;
use Alfa6661\Firebase\FirebaseMessage;
use Illuminate\Notifications\Notification;

class CreditWasCreated extends Notification
{
    public function via($notifiable)
    {
        return [FirebaseChannel::class];
    }

    public function toFirebase($notifiable)
    {
        return FirebaseMessage::create()
            ->title('Title')
            ->body('Push notification body')
            ->data(['id' => $notifiable->id]);
    }
}
```

In order to let your Notification know which device user(s) you are targeting, add the `routeNotificationForFirebase` method to your Notifiable model.

You can either return a single device token, or if you want to notify multiple device just return an array containing all devices.

```
public function routeNotificationForFirebase()
{
    return ["DEVICE_TOKEN", "DEVICE_TOKEN"];
}
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~114 days

Total

5

Last Release

3085d ago

Major Versions

1.0 → 5.2.x-dev2016-08-29

### Community

Maintainers

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

---

Top Contributors

[![alfa6661](https://avatars.githubusercontent.com/u/3650559?v=4)](https://github.com/alfa6661 "alfa6661 (15 commits)")[![pinguinjkeke](https://avatars.githubusercontent.com/u/10704892?v=4)](https://github.com/pinguinjkeke "pinguinjkeke (3 commits)")[![dblazeski](https://avatars.githubusercontent.com/u/753433?v=4)](https://github.com/dblazeski "dblazeski (1 commits)")[![kikemarto](https://avatars.githubusercontent.com/u/14853156?v=4)](https://github.com/kikemarto "kikemarto (1 commits)")

---

Tags

firebase-notificationlaravellaravel-firebaselaravel5-packagenotifications

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alfa6661-laravel-firebase/health.svg)

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

###  Alternatives

[tijsverkoyen/css-to-inline-styles

CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.

5.8k505.3M227](/packages/tijsverkoyen-css-to-inline-styles)[minishlink/web-push

Web Push library for PHP

1.9k12.0M53](/packages/minishlink-web-push)[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[spatie/url-signer

Generate a url with an expiration date and signature to prevent unauthorized access

4422.3M16](/packages/spatie-url-signer)[mattketmo/email-checker

Throwaway email detection library

2742.0M5](/packages/mattketmo-email-checker)[eduardokum/laravel-mail-auto-embed

Library for embed images in emails automatically

1702.0M5](/packages/eduardokum-laravel-mail-auto-embed)

PHPackages © 2026

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