Skip to content

Commit 509c768

Browse files
authored
Allow anonymous notifiables using class name (#110)
Sending using a class name isn't documented anywhere: all documentation examples use short names. However, the class name may be a less ambiguous identifier. Resolves #58
1 parent ae2e254 commit 509c768

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/TwilioChannel.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ public function send($notifiable, Notification $notification)
8585
*/
8686
protected function getTo($notifiable)
8787
{
88+
if ($notifiable->routeNotificationFor(self::class)) {
89+
return $notifiable->routeNotificationFor(self::class);
90+
}
8891
if ($notifiable->routeNotificationFor('twilio')) {
8992
return $notifiable->routeNotificationFor('twilio');
9093
}

0 commit comments

Comments
 (0)