Download the PHP package swanflutter/notification-master without Composer

On this page you can find all versions of the php package swanflutter/notification-master. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package notification-master

swanflutter/notification-master

A modern, production-ready PHP 8.2+ / Laravel push notification package built on the Firebase Cloud Messaging (FCM) HTTP v1 API.

Supports real-time FCM delivery and a polling-mode fallback — all with a clean fluent API, typed exceptions, and first-class Laravel integration.

Latest Version on Packagist PHP Version


Table of Contents


Requirements

Dependency Version
PHP ^8.2
guzzlehttp/guzzle ^7.9
swanflutter/native-jwt ^1.2
Laravel (optional) ^10.0 \| ^11.0 \| ^12.0

Note: This package uses swanflutter/native-jwt for JWT signing (RS256). It is a drop-in, dependency-free replacement for firebase/php-jwt with built-in alg=none and algorithm-confusion protection. The old firebase/php-jwt dependency has been removed.


Installation

Install the package via Composer:

To install a specific version:

Resolving a JWT library conflict

This package depends on swanflutter/native-jwt for RS256 JWT signing. If your application still requires the deprecated firebase/php-jwt, you can migrate to swanflutter/native-jwt, which is a drop-in replacement exposing the same JWT::encode() / JWT::decode() API:

If your application or another dependency still pins firebase/php-jwt, run composer why firebase/php-jwt to find which package holds it back.

Laravel Setup

The package is auto-discovered. After installing, publish the config file:

This creates config/push-notification.php in your application.

Set the path to your Firebase service-account JSON file in .env:

The service-account JSON is generated in the Firebase Console under Project Settings → Service Accounts → Generate New Private Key.

Standalone PHP Setup

No framework integration required — just instantiate FirebasePush directly:


Configuration

config/push-notification.php (after publishing):


Usage — FCM Push

Send to a Device Token

Send to a Topic

Send to a Condition

Multicast (Multiple Tokens)

Advanced Message Builder

Raw Payload

Send any FCM-compatible payload directly, bypassing the builder:

Dry-Run Mode

Retry Configuration


Usage — Laravel Notification Channel

Add toFcm() to your Laravel notification class:

Your notifiable model must implement routeNotificationForFcm() if no target is set on the Message:

Then send it like any other Laravel notification:


Usage — Laravel Facade


Usage — Polling Mode

Polling mode stores notifications server-side so that client devices can retrieve them on demand via a regular HTTP call. No native push infrastructure required.

How Polling Works

Enqueue a Notification

Schedule delivery for a future time:

Client Polling Endpoint

Flush & Forward via FCM

Deliver all queued notifications immediately via FCM and mark them delivered:

Custom Poll Store

Implement PollStoreInterface to use your own storage backend (Eloquent, Redis, SQS, …):

Bind it in your AppServiceProvider:


Exception Handling

All exceptions extend SwanFlutter\NotificationMaster\Exceptions\PushNotificationException.

Exception When thrown
InvalidCredentialsException Service-account file missing, unreadable, or malformed
AuthenticationException JWT signing or Google OAuth token fetch failed
InvalidMessageException Message missing a target or content
SendingFailedException FCM HTTP request failed (network / FCM error); includes getFcmResponse()

Testing

For unit tests, use ArrayPollStore as a lightweight in-memory poll store:


Changelog

See CHANGELOG.md for a full history of changes.


License

This package is open-source software licensed under the MIT License.


All versions of notification-master with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
ext-openssl Version *
guzzlehttp/guzzle Version ^7.9
swanflutter/native-jwt Version ^1.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package swanflutter/notification-master contains the following files

Loading the files please wait ...