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
If I return null, an empty string or an empty array from the routeNotificationForSmscru method of a Notifiable, I get a CouldNotSendNotification exception. I think this is incorrect because all the built-in Laravel channels just do nothing if no recipient is set (examples: 1, 2, 3).
To workaround it I have to do the following in my notification classes:
There is one more problem. Notifications objects are not passed to the routeNotificationForSmscru method so I can't decide what number to send an SMS to depending on the notification class or object.
Also it would be great if I can return either a string or an array of phone numbers from routeNotificationForSmscru method. I know I can return multiple phones in a single string separating them by comma, but the array would be a more convenient and Laravel-style way.
If you agree, I can implement all the features and make a pull request.
The text was updated successfully, but these errors were encountered:
If I return
null
, an empty string or an empty array from therouteNotificationForSmscru
method of a Notifiable, I get aCouldNotSendNotification
exception. I think this is incorrect because all the built-in Laravel channels just do nothing if no recipient is set (examples: 1, 2, 3).To workaround it I have to do the following in my notification classes:
There is one more problem. Notifications objects are not passed to the
routeNotificationForSmscru
method so I can't decide what number to send an SMS to depending on the notification class or object.Also it would be great if I can return either a string or an array of phone numbers from
routeNotificationForSmscru
method. I know I can return multiple phones in a single string separating them by comma, but the array would be a more convenient and Laravel-style way.If you agree, I can implement all the features and make a pull request.
The text was updated successfully, but these errors were encountered: