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
I have a routeNotificationForTwitter on my User model which returns the Twitter username for my user, how can I access this within my notification's toTwitter method?
You can send the $user to the notification class as a parameter of the __construct() method. In inside, you can save it like $this->user = $user. Then you can use it toTwitter() method.
That was the answer to "how to reach $user in the notification class" above. But with the routeNotificationForTwitter() method you don't need anything. The method does it by itself.
I have a
routeNotificationForTwitter
on myUser
model which returns the Twitter username for my user, how can I access this within my notification'stoTwitter
method?The text was updated successfully, but these errors were encountered: