wearesho-team / yii2-wearesho-notifications-repository
This package is abandoned and no longer maintained.
No replacement package was suggested.
1.1.1
2019-05-24 00:55 UTC
Requires
- php: >=7.2
- wearesho-team/wearesho-notifications-repository: ^1.1.0
- yiisoft/yii2: ^2.0.15.1
- yiisoft/yii2-queue: ^2.1
Requires (Dev)
- phpunit/phpunit: ^7.3
- squizlabs/php_codesniffer: ^3.3
This package is auto-updated.
Last update: 2020-07-03 07:54:21 UTC
README
This library helps to configure Wearesho Notifications Repository in Yii2 application.
It contains:
- Bootstrap
- Job for yii2-queue for async notification pushing
Installation
composer require wearesho-team/yii2-wearesho-notifications-repository
Usage
Put Bootstrap to the bootstrap section in your application's config
<?php // config/main.php return [ 'id' => '...', 'basePath' => '...', 'bootstrap' => [ 'notifications' => [ 'class' => Wearesho\Notifications\Yii\Bootstrap::class, ], ], ];
Executing pushing notification in background
<?php /** @var Wearesho\Notifications\Notification $notification */ Yii::$app->queue->push( new Wearesho\Notifications\Yii\PushNotificationJob([ 'notification' => $notification, ]) );