2017 © Pedro Peláez
 

library xinge

This package makes it easy to send notifications via Tencent Xinge with Laravel

image

freyo/xinge

This package makes it easy to send notifications via Tencent Xinge with Laravel

  • Thursday, May 3, 2018
  • by freyo
  • Repository
  • 2 Watchers
  • 4 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 25 % Grown

The README.md

Tencent Xinge PHP SDK for Laravel

Latest Version on Packagist Software License Total Downloads, (*1)

, (*2)

腾讯移动推送(XinGe Push,即 XGPush), (*3)

This package makes it easy to send notifications using Tencent Xinge with Laravel., (*4)

Installation

You can install this package via composer:, (*5)

``` bash composer require freyo/xinge, (*6)


Next add the service provider and facade to your `config/app.php`: ```php ... 'providers' => [ ... Freyo\Xinge\ServiceProvider::class, ], 'aliases' => [ ... 'Xinge' => Freyo\Xinge\Facade::class, ], ...

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider., (*7)

Setting up the Xinge service

You will need to create a Xinge app in order to use this channel. Within in this app you will find the access id and access secret. Place them inside your .env file. In order to load them, add this to your config/services.php file:, (*8)

...
'xinge' => [
    'android' => [
        'access_id'    => env('XINGE_ANDROID_ACCESS_ID'),
        'secret_key'   => env('XINGE_ANDROID_ACCESS_KEY')
    ],
    'ios' => [
        'access_id'    => env('XINGE_IOS_ACCESS_ID'),
        'secret_key'   => env('XINGE_IOS_ACCESS_KEY')
    ],
]
...

This will load the Xinge app data from the .env file. Make sure to use the same keys you have used there like XINGE_IOS_ACCESS_ID., (*9)

Usage

Notification

Follow Laravel's documentation to add the channel to your Notification class., (*10)

Example: AndroidPushSingleAccount, iOSPushSingleAccount., (*11)

Facade

Xinge::android()->PushSingleDevice($deviceToken, $message);
Xinge::android()->PushSingleAccount($deviceType, $account, $message);
Xinge::android()->PushAllDevices($deviceType, $message);
Xinge::android()->PushTags($deviceType, $tagList, $tagsOp, $message);
Xinge::android()->PushAccountList($deviceType, $accountList, $message);

Xinge::ios()->PushSingleDevice($deviceToken, $message, $environment = 0);
Xinge::ios()->PushSingleAccount($deviceType, $account, $message, $environment = 0);
Xinge::ios()->PushAllDevices($deviceType, $message, $environment = 0);
Xinge::ios()->PushTags($deviceType, $tagList, $tagsOp, $message, $environment = 0);
Xinge::ios()->PushAccountList($deviceType, $accountList, $message, $environment = 0);

FULL API DOCUMENT, (*12)

License

The MIT License (MIT). Please see License File for more information., (*13)

The Versions

03/05 2018

dev-master

9999999-dev

This package makes it easy to send notifications via Tencent Xinge with Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar freyo

03/05 2018

2.0.2

2.0.2.0

This package makes it easy to send notifications via Tencent Xinge with Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar freyo

17/12 2017

2.0.1

2.0.1.0

This package makes it easy to send notifications via Tencent Xinge with Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar freyo

07/12 2017

2.0.0

2.0.0.0

This package makes it easy to send notifications via Tencent Xinge with Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar freyo

20/11 2017

1.0.1

1.0.1.0

This package makes it easy to send notifications via Tencent Xinge with Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar freyo

14/11 2017

1.0.0

1.0.0.0

This package makes it easy to send notifications via Tencent Xinge with Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar freyo

23/07 2017

0.1.0

0.1.0.0

This package makes it easy to send notifications via Tencent Xinge with Laravel

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar freyo