PHP code example of pushmix / laravel-web-notification

1. Go to this page and download the library: Download pushmix/laravel-web-notification 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/ */

    

pushmix / laravel-web-notification example snippets


// config/app.php
'providers' => [
    ...
    Pushmix\WebNotification\PushmixServiceProvider::class,
],

use Notification;
use App\Notifications\AbandonedCart;
...
// Target All Subscribed Users
Notification::route('Pushmix', 'all')->notify(new AbandonedCart());

// Target Topic One Subscribers
Notification::route('Pushmix', 'one')->notify(new AbandonedCart());

// Target Topic Two Subscribers
Notification::route('Pushmix', 'two')->notify(new AbandonedCart());


bash
php artisan vendor:publish --provider="Pushmix\WebNotification\PushmixServiceProvider"