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()
8484}
8585```
8686
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+
8795### ` via ` Method
8896On notification entity just add ` \NotificationChannels\Pushbullet\PushbulletChannel::class ` item to array that is returned from ` via ` method.
8997
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function __construct($channelTag)
2424 /**
2525 * {@inheritdoc}
2626 */
27- public function getTarget ()
27+ public function getTarget (): array
2828 {
2929 return ['channel_tag ' => $ this ->channelTag ];
3030 }
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ public function __construct($device)
2424 /**
2525 * {@inheritdoc}
2626 */
27- public function getTarget ()
27+ public function getTarget (): array
2828 {
2929 return ['device_iden ' => $ this ->deviceId ];
3030 }
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function __construct($email)
3030 /**
3131 * {@inheritdoc}
3232 */
33- public function getTarget ()
33+ public function getTarget (): array
3434 {
3535 return ['email ' => $ this ->email ];
3636 }
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ interface Targetable
99 *
1010 * @return array
1111 */
12- public function getTarget ();
12+ public function getTarget (): array ;
1313}
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