method sendMessage documentation in bbn\Api\FCM
function(string $deviceToken, string $title, string $body, array $data = [])
{
if (($res = $this->_send([
'to' => $deviceToken,
'notification' => [
'title' => $title,
'body' => $body,
'vibrate' => 1,
'sound' => 'default',
],
'data' => $data
]))
&& !empty($res->success)
&& !empty($res->results)
&& \is_array($res->results)
&& !empty($res->results[0]->message_id)
) {
return $res->results[0]->message_id;
}
return null;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2023
BBN Solutions