Skip to content

A simple Codeigniter 3 library for Firebase Cloud messaging

License

Notifications You must be signed in to change notification settings

durveshparmar/Codeigniter-FCM-Library

 
 

Repository files navigation

Codeigniter-FCM-Library

A simple codeigniter library for Firebase Cloud messaging.
This is a very simple implementation of firebase cloud messaging library for codeigniter 3.*

Installation

Put the config file in the application/config folder.
Similarly copy the Fcm.php file to the codeigniters application/libraries folder.

Usage

public function sendNotification()
{
   $token = 'Registratin_id'; // push token
   $message = "Test notification message";
   $this->load->library('fcm');
   $this->fcm->setTitle('Test FCM Notification');
   $this->fcm->setMessage($message);
   $json = $this->fcm->getPush();
   $p = $this->fcm->send($token, $json);
}

Examples are in the example_controller.php file.

License

MIT

About

A simple Codeigniter 3 library for Firebase Cloud messaging

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%