Skip to content

Commit

Permalink
Merge pull request #4 from tarfin-labs/documentation-improvements
Browse files Browse the repository at this point in the history
Added information about routeNotificationFor* method for notifiable models
  • Loading branch information
hozdemir authored Feb 28, 2020
2 parents 3897a75 + 91f0af2 commit 53c94a1
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ NETGSM_HEADER=
],
...
```
NETGSM_USER_CODE and NETGSM_SECRET is authentication information of netgsm. NETGSM_HEADER is default header (name or number of sender) of sms messages.

### Usage
#### Service Methods

Expand All @@ -70,6 +72,19 @@ Returns a collection based on the report object passed as a parameter.

#### Sms Sending with Using Notification Channel

In order to let your Notification know which phone number you are sending to, add the routeNotificationForNetgsm method to your Notifiable model e.g your User Model

``` php
public function routeNotificationForNetgsm()
{
/*
where `phone` is a field in your users table,
phone number format can be either `5051234567` or `5051234567, 5441234568`.
*/
return $this->phone;
}
```

You can use the channel in your `via()` method inside the notification:

``` php
Expand Down

0 comments on commit 53c94a1

Please sign in to comment.