Skip to content

Commit

Permalink
update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Milloy committed Nov 9, 2019
1 parent 195f5e6 commit 7f81f32
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,33 @@ class SendHelloText extends Notification
}
}
```

Finally you'll need to extend your notifiable class with the following function so it knows how to route SMS notifications.

```php
<?php
namespace App;

use Illuminate\Notifications\Notifiable;
use Illuminate\Notifications\Notification;
use Illuminate\Foundation\Auth\User as Authenticatable;

class User extends Authenticatable
{
use Notifiable;

/**
* Return the SMS notification routing information.
*
* @param \Illuminate\Notifications\Notification|null $notification
*
* @return mixed
*/
public function routeNotificationForSms(?Notification $notification = null)
{
return $this->phone_number;
}
}
```

Need more help? [Read the article here](https://medium.com/@kylemilloy/sending-sms-messages-with-laravel-and-amazon-sns-a2183af9d90d)

0 comments on commit 7f81f32

Please sign in to comment.