oukhay/fibnotifications

This package provide an easy way to send notifications to firebase from Laravel applications

dev-master 2018-02-16 22:08 UTC

This package is not auto-updated.

Last update: 2025-05-11 07:52:53 UTC


README

License

Introduction

FiBNotifications is an easy to use Laravel package to sending push notification with Firebase Cloud Messaging (FCM).

It provides an API to :

  • Register new device
  • Send notification to single device

Installation

To get the latest version of FiBNotifications on your project, require it from "composer":

$ composer require oukhay/fibnotifications

Or you can add it directly in your composer.json file:

{
	"require": {
    	     "oukhay/fibnotifications": "dev-master"
	}
}

Laravel

Register the provider directly in your app configuration file config/app.php config/app.php:

'providers' => [
	// ...

	   Oukhay\FiBNotifications\FiBNotificationsServiceProvider::class,
]

Add the facade aliases in the same file:

'aliases' => [
	...
	'FiBNotifications' => Oukhay\FiBNotifications\Facade\FiBNotification::class
]

Note: The FiBNotifications facade is needed only if you want to send notification from your controller in your application.

Publish the package config file using the following command:

$ php artisan vendor:publish

This command will generate a config file main.php under /config/fib-notifications and a migration file 0000_00_00_000000_create_fibnotifications_fibn_devices_table.

To create the necessary table fib_devices run the following command :

$ php artisan migrate

Basic Usage

...

API Documentation

You can find more documentation about the API ...

Licence

This library is open-sourced software licensed under the MIT license.

Some of this documentation is coming from the official documentation. You can find it completely on the Firebase Cloud Messaging Website.