PHPackages                             syntech/syntechfcm - 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. [API Development](/categories/api)
4. /
5. syntech/syntechfcm

ActiveLibrary[API Development](/categories/api)

syntech/syntechfcm
==================

A Laravel package for FCM

1.3.1(1y ago)5611.1k↓24.9%7[5 issues](https://github.com/mokhdesigns/syntechfcm/issues)[1 PRs](https://github.com/mokhdesigns/syntechfcm/pulls)MITPHP

Since May 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mokhdesigns/syntechfcm)[ Packagist](https://packagist.org/packages/syntech/syntechfcm)[ RSS](/packages/syntech-syntechfcm/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

Syntech FCM Integration in Laravel
==================================

[](#syntech-fcm-integration-in-laravel)

This guide provides step-by-step instructions to integrate `Syntech\SyntechFcm` for sending Firebase Cloud Messaging (FCM) notifications in a Laravel application.

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4
- Laravel &gt;= 8.0
- Composer

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

[](#installation)

1. **Install the package via Composer**:

    ```
    composer require syntech/syntechfcm
    ```
2. **Publish the configuration file**:

    ```
    php artisan vendor:publish --provider="Syntech\Syntechfcm\SyntechFcmServiceProvider"
    ```
3. **Configure your FCM credentials**:

    Update the `config/syntechfcm.php` file with your FCM project credentials.

    ```
    return [
    'project_id'   => env('FCM_PROJECT_ID'),
    'client_email' => env('FCM_CLIENT_EMAIL'),
    'private_key'  => env('FCM_PRIVATE_KEY'),
    ];
    ```
4. **Add the FCM credentials to your `.env` file**:

    ```
    FCM_PROJECT_ID=your-project-id
    FCM_CLIENT_EMAIL=your-client-email
    FCM_PRIVATE_KEY=your-private-key
    ```

Create and Send Notifications
-----------------------------

[](#create-and-send-notifications)

1. **Create a notification**:

    ```
    php artisan make:notification YourNotification
    ```
2. **Implement the notification class**:

    ```
