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
+25-3Lines changed: 25 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,9 +86,11 @@ class AccountApproved extends Notification
86
86
87
87
### Available Message methods
88
88
89
-
-`platform('')`: Accepts a string value of `iOS`or `Android`.
89
+
-`platform('')`: Accepts a string value of `iOS`, `Android`or `web`.
90
90
-`iOS()`: Sets the platform value to iOS.
91
91
-`android()`: Sets the platform value to Android.
92
+
-`web()`: Sets the platform value to web.
93
+
-`link()`: Accepts a string value which will lead to URI specified on notification click.
92
94
-`title('')`: Accepts a string value for the title.
93
95
-`body('')`: Accepts a string value for the body.
94
96
-`sound('')`: Accepts a string value for the notification sound file. Notice that if you leave blank the default sound value will be `default`.
@@ -118,11 +120,31 @@ public function toPushNotification($notifiable)
118
120
```
119
121
120
122
> - Notice that iOS is the default platform, which means you don't have to call `->iOS()`.
121
-
> - When using `withAndroid()`or `withiOS()` you don't have to define the platform, it's done behind the scenes for you.
123
+
> - When using `withAndroid()`, `withiOS()`or `withWeb()` you don't have to define the platform, it's done behind the scenes for you.
122
124
123
125
### Routing a message
124
126
125
-
By default the pusher "interest" messages will be sent to will be defined using the {notifiable}.{id} convention, for example `App.User.1`, however you can change this behaviour by including a `routeNotificationForPusherPushNotifications()` in the notifiable class method that returns the interest name.
127
+
By default, the pusher "interest" messages will be sent to will be defined using the {notifiable}.{id} convention, for example `App.User.1`,
128
+
however you can change this behaviour by including a `routeNotificationFor()` in the notifiable class.
129
+
130
+
I.e. if you are pushing notification on ``User`` model, you can go to `App\User` class and implement method:
0 commit comments