1. Go to this page and download the library: Download daldan26/fcmv1 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/ */
use Daldan26\Fcmv1\FcmTopicHelper;
$token = "your awesome device token";
FcmTopicHelper::getTopicsByToken($token);
use Daldan26\Fcmv1\FcmNotification;
$notify = new FcmNotification();
$notify->setTitle("Title")->setBody("Message here")->setToken(["token_here"])->setClickAction("NEWS")->send();
use Daldan26\Fcmv1\FcmNotification;
$notify = new FcmNotification();
$notify->setTitle("Title")->setBody("Message here")->setTopic("general_topic")->setClickAction("NEWS")->send();