Skip to content

Commit 9c9020a

Browse files
author
Alexey Plekhanov
committed
Update readme
1 parent bf4362c commit 9c9020a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ You need to put it to `config/services.php` configuration file. You may copy the
5757

5858
### Routing Pushbullet notifications
5959
In order to send notifications to Pushbullet you need to specify recipient for each notifiable entity. There are currently 2 options: pushbullet email or device id of recipient.
60-
To provide library with correct notification recipient you need to define `routeNotificationForTelegram` method on notifiable entity.
60+
To provide library with correct notification recipient you need to define `routeNotificationForPushbullet` method on notifiable entity.
6161

6262
#### Sending notification to email:
6363
```php
64-
public function routeNotificationForTelegram()
64+
public function routeNotificationForPushbullet()
6565
{
6666
return new \NotificationChannels\Pushbullet\Targets\Email($this->email);
6767
}
6868
```
6969

7070
#### Sending notification to device id:
7171
```php
72-
public function routeNotificationForTelegram()
72+
public function routeNotificationForPushbullet()
7373
{
7474
return new \NotificationChannels\Pushbullet\Targets\Device($this->pushbullet_device_id);
7575
}
@@ -78,7 +78,7 @@ public function routeNotificationForTelegram()
7878
#### Third option:
7979
Although, this option is not recommended, you might just return a string (email or device id) and library will do its best to determine if it email or device id.
8080
```php
81-
public function routeNotificationForTelegram()
81+
public function routeNotificationForPushbullet()
8282
{
8383
return $this->email;
8484
}
@@ -91,7 +91,7 @@ On notification entity just add `\NotificationChannels\Pushbullet\PushbulletChan
9191
In your notification class you also should define `toPushbullet` method which will return instance of `\NotificationChannels\Pushbullet\PushbulletMessage`.
9292
```php
9393
/**
94-
* Get the telegram representation of the notification.
94+
* Get the pushbullet representation of the notification.
9595
*
9696
* @param mixed $notifiable
9797
* @return \NotificationChannels\Pushbullet\PushbulletMessage
@@ -101,9 +101,10 @@ public function toPushbullet($notifiable)
101101
$url = url('/invoice/' . $this->invoice->id);
102102

103103
return (new PushbulletMessage)
104-
->note() // or link()
104+
->link()
105105
->title('One of your invoices has been paid!')
106-
->message('Thank you for using our application!');
106+
->message('Thank you for using our application!')
107+
->url($url);
107108
}
108109
```
109110

0 commit comments

Comments
 (0)