PHP code example of junker / onesignal-service-provider
1. Go to this page and download the library: Download junker/onesignal-service-provider 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/ */
junker / onesignal-service-provider example snippets
use HSAL\HSAL;
use Junker\Silex\Provider\OneSignalServiceProvider;
$app->register(new OneSignalServiceProvider(), [
'onesignal.options' => [
'app_id' => 'my App id',
'api_key' => 'my REST API key',
'user_auth_key' => 'my User Auth key'
]
]);
$notifications = $app['onesignal']->notifications->getAll();