Recommend this page to a friend! |
![]() |
Info | Documentation | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 123 | All time: 9,471 This week: 524![]() |
Version | License | PHP version | Categories | |||
yii2-notymo 1.0.0 | Custom (specified... | 5 | PHP 5, Wireless and Mobile, Web services |
Description | Author | ||||||||||||||
This package can be used to send iOS and Android push notifications. |
|
The iOS and Android push notification extension for Yii2.
The suggested installation method is via composer:
$ composer require nstdio/yii2-notymo: "dev-master"
or add
"nstdio/yii2-notymo": "dev-master"
to the require
section of your composer.json
file.
// web.php or console.php
'component' => [
// ...
'notymo' => [
'class' => 'nstdio\yii2notymo\PushNotification',
'push' => [
// If you d?n't want to use one of the services we can just skip them loading.
// It's obvious that the skipped service is not necessary to configure.
// 'skipApns' => true,
// 'skipGcm' => true,
'apns' => [
'live' => true, // Whether to use live credentials.
'cert' => 'path/to/apns_live_cert.pem',
'sandboxCert' => 'path/to/apns_sandbox_cert.pem',
],
'gcm' => [
'apiKey' => 'api_key' // Here goes GCM Service API key.
],
],
'dataProvider' => [
'class' => 'nstdio\yii2notymo\provider\SQLDataProvider',
'table' => 'device_token', // The table from which the data will be obtained.
'identifier' => 'user_id', // The identifier that defines the criteria for what data will be obtained. In this case, it is the column name from the table.
'apns' => 'apns_token', // The column name for APNS device tokens.
'gcm' => 'gcm_token', // The column name for GCM device tokens.
],
],
],
// For example SiteController.php
use nstdio\notymo\Message;
// ...
$userIds = [1, 2, 3, 4, 5];
/ @var \nstdio\yii2notymo\PushNotification $push */
$push = Yii::$app->notymo;
$msg = new Message();
$msg->setMessage("Test msg.");
$push->send($msg, $userIds); // Message will be sent to mentioned users.
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() |
Class | Class source | ||
![]() ![]() |
Doc. | Documentation |
![]() |
/ | provider |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
Class | Class source |
![]() |
/ | tests |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Aux. | Auxiliary script | ||
![]() |
Class | Class source | ||
![]() |
Class | Class source |
![]() |
/ | tests | / | config |
File | Role | Description |
---|---|---|
![]() ![]() |
Aux. | Auxiliary script |
![]() ![]() |
Aux. | Auxiliary script |
![]() |
/ | tests | / | fixtures |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
Class | Class source |
![]() |
/ | tests | / | migrations |
File | Role | Description |
---|---|---|
![]() |
Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.