PHP code example of hatasever / onesignal
1. Go to this page and download the library: Download hatasever/onesignal 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/ */
hatasever / onesignal example snippets
sh
use OneSignal;
$params = [];
$params[' $params['small_icon'] = 'mdpi';
$params['large_icon'] = 'xxxhdpi';
$contents = [
"en" =>'Hello World!',
"tr" => 'Merhaba Dünya!',
];
$params['contents'] = $contents;
OneSignal::sendNotificationCustom($params);