This bundle provide a easy way to send a push message by using Platinium
Versions < 1.1.6 are deprecated
Open a command console, enter your project directory and execute:
$ composer require openium/platinium-bundle
You need to add 4 information in the .env
###> openium/platinium-bundle ###
PLATINIUM_SERVER_ID=
PLATINIUM_SERVER_KEY=
PLATINIUM_SERVER_TOKEN_DEV=
PLATINIUM_SERVER_TOKEN_PROD=
###< openium/platinium-bundle ###
Example :
// set by dependency injection
$notifier = new PlatiniumNotifier(...);
// get number of future pushed devices
$deviceCount = $notifier->subscribe($groups, $langs, $langNotIn, $latitude, $longitude, $tolerance, $radius, $paramsBag, $badgeValue, $newsStand, $sound);
// send a push message
$pushSended = $notifier->notify($message, $groups, $langs, $langNotIn, $latitude, $longitude, $tolerance, $radius);