-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.php
41 lines (34 loc) · 863 Bytes
/
test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* Created by PhpStorm.
* User: Bruce Xie
* Date: 2019-09-11
* Time: 14:01
*/
// require '../vendor/autoload.php';
require '../../../../vendor/autoload.php';
use Notification\Notification;
$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);
// success
$notify->send('success');
// failed
// $notify->send('failed');
// no_image
// $notify->send('no_image');