PHP code example of legomolina / fcm-push-notification
1. Go to this page and download the library: Download legomolina/fcm-push-notification library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
legomolina / fcm-push-notification example snippets
FCMPushNotifications::API_KEY = "my_api_key";
$notification = new FCMNotification("Title", "Message");
FCMPushNotifications::send("mobile_token_or_topic", $notification, [ "custom" => "data" ]);