PHP code example of asanbarco / notifier

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

    

asanbarco / notifier example snippets


public function sendSMS(array $numbers, string $txt)
{
    Notifier::onQueue('sms'); //if you do not set queue name it run send immediately and return result
    return Notifier::sendSMS($txt, $numbers);
}

public function sendPush(array $tokens, string $title, string $txt, ?array $data = [])
{
    Notifier::onQueue('push');
    return Notifier::sendPush($title, $txt, $tokens, $data);
}


Notifier::read($id);

Notifier::getCounts();
Notifier::getCounts($userId); // with user iddentifier (id or mobile ...)

Notifier::getUnReads(); // or getReads()
Notifier::getUnReads($identifier, $type, $limit); // all parameters are optional. If set limit it make paginator
$xslt
php artisan vendor:publish
$xslt
php artisan migrate
$xslt
php artisan queue:work