Download the PHP package foziluff/firebase without Composer

On this page you can find all versions of the php package foziluff/firebase. 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 firebase

Firebase Cloud Messaging for Laravel

Lightweight, high-performance, and secure Laravel package for sending Firebase Cloud Messaging (FCM) push notifications using the new HTTP v1 API.

This package is built with Senior-level optimizations in mind: it generates JWTs locally (no need for bloated external Google API clients), uses in-memory caching to prevent TOCTOU race conditions and reduce Disk I/O, and automatically handles auto-retries for expired authentication tokens.

Features

Requirements

Installation

Install the package via Composer:

Configuration

You do not need to publish any configuration files. The package intelligently configures itself from your .env file.

Add the FIREBASE_CREDENTIALS variable to your .env file. You can configure it in one of two ways:

Option 1: File Path (Recommended)

Place your Firebase Service Account JSON file (e.g., firebase.json) in the root of your Laravel project and reference it:

(The package automatically resolves relative paths using Laravel's base_path(), so it works perfectly in both web requests and artisan queues).

Option 2: Raw JSON String

If you prefer not to store files on the server (e.g., in Docker/Kubernetes environments), you can pass the raw JSON string directly:

Usage

Use the provided FirebasePush facade to send notifications using its clean Fluent Builder interface.

Send to a Specific Device Token

Send to a Topic

The package automatically prefixes the topic with /topics/ if you forget it.

Silent / Data-Only Pushes

To send a push notification that doesn't trigger a visual alert on the device but wakes up the app in the background, simply omit the title and body:

Advanced Usage (Raw JSON)

If you need to send highly specific FCM parameters (like webpush configs or custom android properties) that aren't available in the builder, you can pass a raw payload array directly:

Error Handling

Unlike standard implementations that throw an exception and crash your loops on invalid device tokens (404 Not Found or 400 Bad Request), this package gracefully returns the Google API error array.

This allows you to safely process bulk notifications and delete invalid tokens from your database without wrapping everything in a try-catch block:

Exceptions are only thrown for critical failures (e.g., Google FCM servers are down with a 5xx error, or your JSON credentials are invalid).

License

The MIT License (MIT).


All versions of firebase with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0 || ^12.0 || ^13.0
illuminate/http Version ^11.0 || ^12.0 || ^13.0
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 foziluff/firebase contains the following files

Loading the files please wait ...