PHP code example of wearesho-team / yii2-wearesho-notifications-repository

1. Go to this page and download the library: Download wearesho-team/yii2-wearesho-notifications-repository library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wearesho-team / yii2-wearesho-notifications-repository example snippets




// config/main.php

return [
    'id' => '...',
    'basePath' => '...',
    'bootstrap' => [
        'notifications' => [
            'class' => Wearesho\Notifications\Yii\Bootstrap::class,
        ],
    ],
];




/** @var Wearesho\Notifications\Notification $notification */

Yii::$app->queue->push(
    new Wearesho\Notifications\Yii\PushNotificationJob([
        'notification' => $notification,
    ])
);