File tree Expand file tree Collapse file tree 6 files changed +25
-4
lines changed Expand file tree Collapse file tree 6 files changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,14 @@ public function routeNotificationForPushbullet()
84
84
}
85
85
```
86
86
87
+ #### Sending notification to all of the user's devices
88
+ ``` php
89
+ public function routeNotificationForPushbullet()
90
+ {
91
+ return new \NotificationChannels\Pushbullet\Targets\UserDevices();
92
+ }
93
+ ```
94
+
87
95
### ` via ` Method
88
96
On notification entity just add ` \NotificationChannels\Pushbullet\PushbulletChannel::class ` item to array that is returned from ` via ` method.
89
97
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function __construct($channelTag)
24
24
/**
25
25
* {@inheritdoc}
26
26
*/
27
- public function getTarget ()
27
+ public function getTarget (): array
28
28
{
29
29
return ['channel_tag ' => $ this ->channelTag ];
30
30
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function __construct($device)
24
24
/**
25
25
* {@inheritdoc}
26
26
*/
27
- public function getTarget ()
27
+ public function getTarget (): array
28
28
{
29
29
return ['device_iden ' => $ this ->deviceId ];
30
30
}
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function __construct($email)
30
30
/**
31
31
* {@inheritdoc}
32
32
*/
33
- public function getTarget ()
33
+ public function getTarget (): array
34
34
{
35
35
return ['email ' => $ this ->email ];
36
36
}
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ interface Targetable
9
9
*
10
10
* @return array
11
11
*/
12
- public function getTarget ();
12
+ public function getTarget (): array ;
13
13
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ namespace NotificationChannels \Pushbullet \Targets ;
6
+
7
+ class UserDevices implements Targetable
8
+ {
9
+ public function getTarget (): array
10
+ {
11
+ return [];
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments