1. Go to this page and download the library: Download dwade75/onesignalbundle 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/ */
dwade75 / onesignalbundle example snippets
composer
public function registerBundles()
{
$bundles = [
new Dwade75\OnesignalBundle\Dwade75OnesignalBundle(),
];
}
$app = new AppsController();
$app->getApps();
$app->getAppById();
$app->createApp(array('name' => 'Api testing','apns_env' => 'sandbox'));
$app->editAppById(array('name' => 'update update Api testing','apns_env' => 'sandbox'));
### Notifications: ###
$notification = new NotificationsController();
$notification->createNotification(['contents' => ['en' => 'Super message from api'], ');