PHP code example of matviib / notifier

1. Go to this page and download the library: Download matviib/notifier 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/ */

    

matviib / notifier example snippets


MatviiB\Notifier\NotifierServiceProvider::class,
 artisan notifier:init
 artisan notifier:init
sh
php artisan vendor:publish

// Horizontal options: left, center, right
// Vertical options: top, bottom
'position' => [
        'vertical' => 'bottom',
        'horizontal' => 'right'
    ]

Route::get('chart', function () {
    return view('chart');
})->name('chart');

use MatviiB\Notifier\Events\Notify; 

...

protected $signature = 'test';

public function handle()
    {
        while ($i < 100) {
            $value = random_int(10, 100);
            $data['value'] = $value;
            event(new Notify($data, ['chart']));
            usleep(rand(100000, 500000));
        }
}