imanborumand / mlify
A romantic package for faster connection with Firebase!
v1.0
2022-05-27 14:33 UTC
README
A lightweight package for sending notifications to Firebase
Installation:
Require the package via Composer:
composer require imanborumand/mlify
Publish config:
php artisan vendor:publish --tag=mlify-config
Set Your Firebase Authentication Key [important]
- go to config directory
- in mlify.php set auth_key to your firebase Auth key
Usage
Mlify::setParams( 'this is title', 'this is body', ['post_id' => 1, 'index_img' => 'http://yourapp.com/custom.jpg'] )->sendTo(['user token or list of tokens ']);
description:
setParams method:
set title, body and custom data
sendTo method:
This method has an input argument, which is a list of users' Firebase tokens to which you want to send a notification. This list can contain one or more tokens