Skip to content

Send notifications on Windows7/10 / macOS / Linux Desktop with php.

License

Notifications You must be signed in to change notification settings

xiebruce/php-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-notification

Send notifications on Windows7/10 / macOS / Linux Desktop with php.

Install

composer require xiebruce/php-notification

Usage

require 'vendor/autoload.php';

use Notification\Notification;

// subtitle only supported on macOS.
$config = [
	'success' => [
		'title' => 'Upload succeed',
		'subtitle' => 'Upload succeed',
		'message' => 'You can paste url directly.',
	],
	'failed' => [
		'title' => 'Upload failed',
		'subtitle' => 'Upload failed',
		'message' => 'Sorry, Upload failed.',
	],
	'no_image' => [
		'title' => 'No image',
		'subtitle' => 'No image was dected on the clipboard',
		'message' => 'No image was detected on the clipboard, Please take a screenshot first.',
	],
];

$notify = new Notification($config);
$notify->send('success');

Demonstration

macOS: notification-macOS

Windows 10: notification-Win10

Windows 7: notification-Win7

Linux(Ubuntu 18.04): notification-Ubuntu

About

Send notifications on Windows7/10 / macOS / Linux Desktop with php.

Resources

License

Stars

Watchers

Forks

Packages

No packages published