PHP code example of bpocallaghan / notify

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

    

bpocallaghan / notify example snippets


'providers' => [
    Bpocallaghan\Notify\NotifyServiceProvider::class,
];

'aliases' => [
    'Notify' => Bpocallaghan\Notify\Facades\Notify::class,
];

public function index()
{
    // helper function - default to the 'info'
    notify('Title', 'Description');
    
    // return object first
    notify()->info('Title', 'Description');
    
    // via the facade
    Notify::info('Title', 'Description');
    
    return view('home');
}
bash
php artisan vendor:publish --provider="Bpocallaghan\Notify\NotifyServiceProvider" --tag=view
bash
php artisan vendor:publish --provider="Bpocallaghan\Notify\NotifyServiceProvider" --tag=public