2017 © Pedro Peláez
 

helpers yii2-pusher

yii2 web push for pusher.com

image

bariew/yii2-pusher

yii2 web push for pusher.com

  • Monday, April 11, 2016
  • by bariew
  • Repository
  • 1 Watchers
  • 0 Stars
  • 75 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Yii2 pusher

INSTALL

php composer.phar require bariew/yii2-pusher, (*1)

USAGE

1.  Add a new component into yor config file:
'components' => [
    'webpusher' => [
        'class' => 'bariew\yii2Pusher\Component',
        'app_id' => '***', // get your credentials on pusher.com
        'key' => '***',
        'secret' => '***',
    ]
]
2.  Include a widget into your view file e.g. "main.php":
    <?= \bariew\yii2Pusher\Widget::widget(['events' => [
        'notification' => new \yii\web\JsExpression("function(data){console.log(data);}")
    ]]) ?>
3.  Now you can send a notification to any user or an array of users:
Yii::$app->webpusher->userPush("hello user", [Yii::$app->user->id]);

The Versions

11/04 2016

dev-master

9999999-dev

yii2 web push for pusher.com

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 push pusher

11/04 2016

0.1.1

0.1.1.0

yii2 web push for pusher.com

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 push pusher

11/04 2016

0.1.0

0.1.0.0

yii2 web push for pusher.com

  Sources   Download

BSD-3-Clause

The Requires

 

by Bariev Pavel

yii2 push pusher