PHP code example of freyo / xinge
1. Go to this page and download the library: Download freyo/xinge 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/ */
freyo / xinge example snippets
...
'providers' => [
...
Freyo\Xinge\ServiceProvider::class,
],
'aliases' => [
...
'Xinge' => Freyo\Xinge\Facade::class,
],
...
...
'xinge' => [
'android' => [
'access_id' => env('XINGE_ANDROID_ACCESS_ID'),
'secret_key' => env('XINGE_ANDROID_ACCESS_KEY')
],
'ios' => [
'access_id' => env('XINGE_IOS_ACCESS_ID'),
'secret_key' => env('XINGE_IOS_ACCESS_KEY')
],
]
...
Xinge::android()->PushSingleDevice($deviceToken, $message);
Xinge::android()->PushSingleAccount($deviceType, $account, $message);
Xinge::android()->PushAllDevices($deviceType, $message);
Xinge::android()->PushTags($deviceType, $tagList, $tagsOp, $message);
Xinge::android()->PushAccountList($deviceType, $accountList, $message);
Xinge::ios()->PushSingleDevice($deviceToken, $message, $environment = 0);
Xinge::ios()->PushSingleAccount($deviceType, $account, $message, $environment = 0);
Xinge::ios()->PushAllDevices($deviceType, $message, $environment = 0);
Xinge::ios()->PushTags($deviceType, $tagList, $tagsOp, $message, $environment = 0);
Xinge::ios()->PushAccountList($deviceType, $accountList, $message, $environment = 0);