PHP code example of jolicode / jolinotif

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

    

jolicode / jolinotif example snippets




use Joli\JoliNotif\Notification;
use Joli\JoliNotif\DefaultNotifier;

$notifier = new DefaultNotifier();

// Create your notification
$notification =
    (new Notification())
    ->setTitle('Notification title')
    ->setBody('This is the body of your notification')
    ->setIcon(__DIR__.'/path/to/your/icon.png')
    ->addOption('subtitle', 'This is a subtitle') // Only works on macOS (AppleScriptDriver)
    ->addOption('sound', 'Frog') // Only works on macOS (AppleScriptDriver & TerminalNotifierDriver)
;

// Send it
$notifier->send($notification);