Skip to content

Commit

Permalink
Allow anonymous notifiables using class name (#110)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
miken32 authored Oct 19, 2020
1 parent ae2e254 commit 509c768
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/TwilioChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ public function send($notifiable, Notification $notification)
*/
protected function getTo($notifiable)
{
if ($notifiable->routeNotificationFor(self::class)) {
return $notifiable->routeNotificationFor(self::class);
}
if ($notifiable->routeNotificationFor('twilio')) {
return $notifiable->routeNotificationFor('twilio');
}
Expand Down

0 comments on commit 509c768

Please sign in to comment.