PHP code example of jybtx / one-signal

1. Go to this page and download the library: Download jybtx/one-signal 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/ */

    

jybtx / one-signal example snippets


'providers' => [
    ...
    Jybtx\\OneSignal\\Providers\\OneSignalServiceProvider::class,
],
'aliases'  => [
    ...
    "OneSignal": Jybtx\OneSignal\Faceds\OneSignalFacade::class,
]

use OneSignal;
OneSignal::registerPlayerId($identifier,$device_type,$device_os='',$device_model='');

OneSignal::sendMessageAllUsers($title,$txt,$time=null,$data = array());

OneSignal::sendMessageSomeUser($title,$txt,$users,$data = array());

OneSignal::revokeMessage($notifId);

OneSignal::sendMessageUsingTags($title,$txt, $tags, $url = NULL, $data = NULL, $buttons = NULL, $subtitle = NULL);

OneSignal::getNotifications($limit = NULL, $offset = NULL, $kind = 1 );

OneSignal::getAllUserToExportCsv();
shell
php artisan vendor:publish --provider "Jybtx\OneSignal\Providers\OneSignalServiceProvider"