Skip to content

Commit

Permalink
Adjust samples in Readme to use non deprecated methods(#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Norgul authored Sep 10, 2020
1 parent dc93c96 commit f05d267
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ class AccountApproved extends Notification
public function toOneSignal($notifiable)
{
return OneSignalMessage::create()
->subject("Your {$notifiable->service} account was approved!")
->body("Click here to see details.")
->url('http://onesignal.com')
->setSubject("Your {$notifiable->service} account was approved!")
->setBody("Click here to see details.")
->setUrl('http://onesignal.com')
->webButton(
OneSignalWebButton::create('link-1')
->text('Click here')
Expand Down Expand Up @@ -122,10 +122,10 @@ public function routeNotificationForOneSignal()
```
### All available methods

- `subject('')`: Accepts a string value for the title.
- `body('')`: Accepts a string value for the notification body.
- `icon('')`: Accepts an url for the icon.
- `url('')`: Accepts an url for the notification click event.
- `setSubject('')`: Accepts a string value for the title.
- `setBody('')`: Accepts a string value for the notification body.
- `setIcon('')`: Accepts an url for the icon.
- `setUrl('')`: Accepts an url for the notification click event.
- `webButton(OneSignalWebButton $button)`: Allows you to add action buttons to the notification (Chrome 48+ (web push) only).
- `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).
- `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).
Expand Down

0 comments on commit f05d267

Please sign in to comment.