2017 © Pedro Peláez
 

library yii2-onesignal

Yii2 component for OneSignal.com integration

image

rocketfirm/yii2-onesignal

Yii2 component for OneSignal.com integration

  • Monday, September 4, 2017
  • by naffiq
  • Repository
  • 3 Watchers
  • 4 Stars
  • 4,731 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 3 Versions
  • 11 % Grown

The README.md

yii2-onesignal

Yii2 component for OneSignal.com integration. Any contribution is highly encouraged!, (*1)

Installation

Preferred way to install is through Composer., (*2)

composer require rocketfirm/yii2-onesignal

Configuration

Add following code to your configuration file (main.php):, (*3)

<?php

return [
    'components' => [
        // ...

        'onesignal' => [
            'class' => '\rocketfirm\onesignal\OneSignal',
            'appId' => 'ONESIGNAL_APP_ID',
            'apiKey' => 'ONESIGNAL_API_KEY',
        ]
    ]
]

Usage

After adding onesignal component to your project you can now simply add players to your OneSignal application by running following code:, (*4)

<?php
\Yii::$app->onesignal->players()->add($deviceType, $options);

Run following command to send notifications:, (*5)

<?php
\Yii::$app->onesignal->notifications()->create($message, $options)

Visit official onesignal.com documentation for more details., (*6)

The Versions

04/09 2017

dev-master

9999999-dev

Yii2 component for OneSignal.com integration

  Sources   Download

MIT

The Requires

 

23/11 2016

0.0.2

0.0.2.0

Yii2 component for OneSignal.com integration

  Sources   Download

MIT

The Requires

 

08/08 2016

0.0.1

0.0.1.0

Yii2 component for OneSignal.com integration

  Sources   Download

MIT

The Requires