yuqinglan/jg-push

Third party message push (极光)

v1.1 2019-02-27 03:42 UTC

This package is auto-updated.

Last update: 2025-05-27 23:46:53 UTC


README

Introduction

Third party message push

Install

$ composer require yuqinglan/jg-push

Demo

<?php

require __DIR__ . '/vendor/autoload.php';

$appKey = 'your-app-key';
$masterSecret = 'your-master-secret';

$alert = 'Hi JPush!';
$extras = [
    'type' => 1,
    'url' => 'http://www.mayanlong.com'
];
$platform = ['android', 'ios'];
$audience = [
    'alias' => ['13888888888']
];

$push = new zhangjian\Push\JPush($appKey, $masterSecret);
$push->push($alert, $extras, $platform, $audience);