You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+7-7
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,9 @@ class AccountApproved extends Notification
80
80
public function toOneSignal($notifiable)
81
81
{
82
82
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')
86
86
->webButton(
87
87
OneSignalWebButton::create('link-1')
88
88
->text('Click here')
@@ -122,10 +122,10 @@ public function routeNotificationForOneSignal()
122
122
```
123
123
### All available methods
124
124
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.
129
129
-`webButton(OneSignalWebButton $button)`: Allows you to add action buttons to the notification (Chrome 48+ (web push) only).
130
130
-`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).
131
131
-`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