Download the PHP package humamkerdiah/fcm-notifications without Composer

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

Laravel FCM Notifications

A Laravel package for sending Firebase Cloud Messaging (FCM) notifications with support for both legacy API and the new FCM HTTP v1 API.

About

Laravel FCM Notifications is a powerful package for integrating Firebase Cloud Messaging (FCM) into your Laravel application. It supports both the legacy FCM API and the new FCM HTTP v1 API (recommended). Send push notifications to individual users or groups, manage topics, and more with simple configuration and seamless integration.

Table of Contents

Features

Installation

You can install the package via composer:

Configuration

After installation, publish the config file:

This will create a config/fcm.php file where you can configure your FCM settings.

FCM HTTP v1 API (Recommended)

The v1 API uses OAuth 2.0 authentication and is Google's recommended approach for FCM.

Setup for v1 API

  1. Get Service Account Key:

    • Go to Firebase Console
    • Select your project → Project Settings → Service Accounts
    • Click "Generate new private key" and download the JSON file
  2. Update your .env file:

Alternatively, you can use the GOOGLE_APPLICATION_CREDENTIALS environment variable:

Legacy API Support

The package still supports the legacy server key authentication for backwards compatibility.

Setup for Legacy API

Update your .env file:

Usage

Using Laravel Notifications

There are two ways to use FCM notifications in your Laravel application:

1. Using the FCM Channel Class

2. Using the Channel Name

Setting Up Your Model

Make your model use FCM notifications by implementing the routeNotificationForFcm method:

Sending Notifications

Topic Management

Error Handling

The package provides comprehensive error handling for both API versions:

v1 API Response Format

Legacy API Response Format

Migration Guide

If you're upgrading from the legacy API to v1 API, see our Migration Guide for detailed instructions.

Testing

When testing your application, you can mock the FCM notifications:

Requirements

Security Considerations

License

The MIT License (MIT). Please see License File for more information.


All versions of fcm-notifications with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
guzzlehttp/guzzle Version ^7.0
firebase/php-jwt Version ^6.0
google/auth Version ^1.18
illuminate/support Version ^8.0|^9.0|^10.0|^11.0
illuminate/contracts Version ^8.0|^9.0|^10.0|^11.0
illuminate/notifications Version ^8.0|^9.0|^10.0|^11.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 humamkerdiah/fcm-notifications contains the following files

Loading the files please wait ....