@@ -35,7 +35,7 @@ public function __construct(Sns $sns, Dispatcher $events)
3535 public function send ($ notifiable , Notification $ notification )
3636 {
3737 try {
38- $ destination = $ this ->getDestination ($ notifiable );
38+ $ destination = $ this ->getDestination ($ notifiable, $ notification );
3939 $ message = $ this ->getMessage ($ notifiable , $ notification );
4040
4141 return $ this ->sns ->send ($ message , $ destination );
@@ -53,13 +53,14 @@ public function send($notifiable, Notification $notification)
5353 /**
5454 * Get the phone number to send a notification to.
5555 *
56- * @param $notifiable
56+ * @param mixed $notifiable
57+ * @param \Illuminate\Notifications\Notification $notification
5758 * @return mixed
5859 * @throws CouldNotSendNotification
5960 */
60- protected function getDestination ($ notifiable )
61+ protected function getDestination ($ notifiable, Notification $ notification )
6162 {
62- if ($ to = $ notifiable ->routeNotificationFor ('sns ' )) {
63+ if ($ to = $ notifiable ->routeNotificationFor ('sns ' , $ notification )) {
6364 return $ to ;
6465 }
6566
@@ -69,7 +70,7 @@ protected function getDestination($notifiable)
6970 /**
7071 * Try to get the phone number from some commonly used attributes for that.
7172 *
72- * @param $notifiable
73+ * @param mixed $notifiable
7374 * @return mixed
7475 * @throws CouldNotSendNotification
7576 */
0 commit comments