PHPackages                             farjihacker/fcm-push-notify - 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. farjihacker/fcm-push-notify

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

farjihacker/fcm-push-notify
===========================

Google Push Notification Library

07PHP

Since Jan 9Pushed 7y ago1 watchersCompare

[ Source](https://github.com/farjiHacker/FCM-Push-Notify)[ Packagist](https://packagist.org/packages/farjihacker/fcm-push-notify)[ RSS](/packages/farjihacker-fcm-push-notify/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

FCM-PUSH-NOTIFY
===============

[](#fcm-push-notify)

This is the library for sent push notification using Google Firebase(FCM) Push Notification.

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

[](#installation)

Use the `Composer` to install FCM-PUSH-Notify Library.

```
composer require farjihacker/fcm-push-notify
```

Usage
-----

[](#usage)

**Step 1: Install using above command.**

**Step 2: Import/Use this Namespace.**

```
use FirebaseNotify\Firebase; // Firebase Utility
use FirebaseNotify\Push; // Create Message with JSON Formate
```

**Step 3: Create Two Object.**

```
$firebase = new Firebase("FIREBASE_API_KEY"); // Pass Your API Key as Param
$push = new Push();
```

**Step 4: Create JSON Data Object Using `$push` Object.**

```
// optional payload
$payload = array();
$payload['team'] = 'India';
$payload['score'] = '5.6';

// notification title
$title = "Test Title";

// notification message
$message = "MSG";

// push type - single user / topic
$push_type = "individual";

// whether to include to image or not
$include_image = "";

$push = new Push();
$push->setTitle($title);
$push->setMessage($message);

if ($include_image) {
    $push->setImage('http://api.androidhive.info/images/minion.jpg');
} else {
    $push->setImage('');
}
$push->setIsBackground(FALSE);
$push->setPayload($payload);
```

**Step 5: Sent Push Notification using `$firebase` object.**

```
//Get JSON Object
$json = $push->getPush();
//echo "";
//print_r($json);

// User Token
$regId = "USER_TOKEN";
$response = $firebase->send($regId, $json);

// Enable this line to check firebase success/error response.
//print_r($response);
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![maulikpatel-in](https://avatars.githubusercontent.com/u/13593466?v=4)](https://github.com/maulikpatel-in "maulikpatel-in (5 commits)")

### Embed Badge

![Health badge](/badges/farjihacker-fcm-push-notify/health.svg)

```
[![Health](https://phpackages.com/badges/farjihacker-fcm-push-notify/health.svg)](https://phpackages.com/packages/farjihacker-fcm-push-notify)
```

###  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)[laravel-notification-channels/discord

Laravel notification driver for Discord.

2371.3M11](/packages/laravel-notification-channels-discord)

PHPackages © 2026

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