PHP code example of nawasara / notification

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

    

nawasara / notification example snippets


use Nawasara\Notification\Facades\Notify;

Notify::to($user)
    ->template('ssl.expiry.warning')
    ->data(['domain' => 'dinkes.ponorogo.go.id', 'days' => 7])
    ->send();

Notify::to('[email protected]')
    ->channel('email')
    ->subject('Test')
    ->body('<p>Hello world</p>')
    ->send();

Notify::to($user)->template('welcome')->data([...])->sync()->send();
bash
composer migrate
php artisan db:seed --class="Nawasara\Notification\Database\Seeders\PermissionSeeder" --force