Skip to content

amiriun/Pushe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pushe.co (Push Notification Service)

Build Status Coverage Status

Instalation

To install via Composer , use the command bellow:

composer require amiriun/pushe

Usage

use \Amiriun\Pushe\Configuration;
use \Amiriun\Pushe\Filter;
use \Amiriun\Pushe\Pushe;

// Firstly,you have to set your configuration
Configuration::make()->setToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
Configuration::make()->setIsAsync(true);
Configuration::make()->setApplicationsPackageName(["com.example.myApp"]);

// If you'd like to filter push to some users with some parameters you can use filter:
$filter = (new Filter())
        ->byInstanceId(['xxxxx','yyyyy']) // Filter by instance id of web push users
        ->byAndroidId(['xxx','yyy']) // Filter by android id of android users
        ->byBrand(['lg']) // Filter by mobile's brand of users
        ->byOperator(['mci']) // Filter by users who has specify operator
        ->byMobileNetwork(['lte']) // Filter by network of users
        ->byPushIdOrIMEI('nnnnn'); // Filter by user's push id or imei
        
        
// Finally you can fill your notification data to send
$pushe = new Pushe();
$pushe->setTitle('titr')
    ->setContent('badane')
    ->filter($filter) // optional
    ->setVisible() // optional
    ->send();
        

About

PHP API Client for pushe.co ( push notification service )

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages