Skip to content

Commit f05d267

Browse files
authored
Adjust samples in Readme to use non deprecated methods(#115)
1 parent dc93c96 commit f05d267

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ class AccountApproved extends Notification
8080
public function toOneSignal($notifiable)
8181
{
8282
return OneSignalMessage::create()
83-
->subject("Your {$notifiable->service} account was approved!")
84-
->body("Click here to see details.")
85-
->url('http://onesignal.com')
83+
->setSubject("Your {$notifiable->service} account was approved!")
84+
->setBody("Click here to see details.")
85+
->setUrl('http://onesignal.com')
8686
->webButton(
8787
OneSignalWebButton::create('link-1')
8888
->text('Click here')
@@ -122,10 +122,10 @@ public function routeNotificationForOneSignal()
122122
```
123123
### All available methods
124124

125-
- `subject('')`: Accepts a string value for the title.
126-
- `body('')`: Accepts a string value for the notification body.
127-
- `icon('')`: Accepts an url for the icon.
128-
- `url('')`: Accepts an url for the notification click event.
125+
- `setSubject('')`: Accepts a string value for the title.
126+
- `setBody('')`: Accepts a string value for the notification body.
127+
- `setIcon('')`: Accepts an url for the icon.
128+
- `setUrl('')`: Accepts an url for the notification click event.
129129
- `webButton(OneSignalWebButton $button)`: Allows you to add action buttons to the notification (Chrome 48+ (web push) only).
130130
- `button(OneSignalButton $button)`: Allows you to add buttons to the notification (Supported by iOS 8.0 and Android 4.1+ devices. Icon only works for Android).
131131
- `setData($key, $value)`: Allows you to set additional data for the message payload. For more information check the [OneSignal documentation](https://documentation.onesignal.com/reference).

0 commit comments

Comments
 (0)