Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ossycodes authored Nov 6, 2023
1 parent 8b73afc commit 531ccf0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,34 +122,34 @@ class NewsWasPublished extends Notification
}
}
```
You can also modify who the notification(SMS) is sent from, this will overide the AT_FROM= in your .env
You can also modify who the notification(SMS) is sent from, this will override the AT_FROM= in your .env
**Please only do this if you have a VALID sender_ID**
``` php
return (new AfricasTalkingMessage())
->content('Your SMS message content')
->content("Your SMS message content")
->from("set any sender id/name here");
```
You can also modify who the notification(SMS) is sent to (the recipient)
``` php
return (new AfricasTalkingMessage())
->content('Your SMS message content')
->to("put the recipient phonenumber here"); //eg ->to(1111111111)
->content("Your SMS message content")
->to("put the recipient phone number here"); //eg ->to(1111111111)
```
It's important to know the Order in which the recipient phone number the notification(SMS) will be sent to will be used
1) If you have defined the routeNotificationForAfricasTalking() method on the Notifiable class (User.php in this case) and returned a valid phone number, then that will be used.
2) if you did not define routeNotificationForAfricasTalking() method on the Notifiable class (User.php in this case), then the phone_number attribute of the User will be used ($user->phone_number)
3) Lastly if the recipient phone number is set using ->to(1111111), this will overide the phone number provided in either 1 or 2.
3) Lastly if the recipient phone number is set using ->to(1111111), this will override the phone number provided in either 1 or 2.
``` php
return (new AfricasTalkingMessage())
->content('Your SMS message content')
->to("put the recipient phonenumber here"); //eg ->to(11111111)
->content("Your SMS message content")
->to("put the recipient phone number here"); //eg ->to(11111111)
```
## Testing
Expand Down

0 comments on commit 531ccf0

Please sign in to comment.