-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* support setting recipient dynamically * wip
- Loading branch information
Showing
4 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
namespace NotificationChannels\AfricasTalking\Exceptions; | ||
|
||
use Exception; | ||
|
||
class InvalidPhonenumber extends Exception | ||
{ | ||
public static function configurationNotSet(): self | ||
{ | ||
return new static( | ||
"please provide a phonenumber to which the notification(SMS) will be sent to, you can do these in three ways: | ||
1) by defining a routeNotificationForAfricasTalking method on your notifiable entity | ||
or | ||
2) by creating a new column called `phone` in your notifiable table | ||
3) by chaining from(phonenumber) method to your AfricasTalkingMessage() eg (new AfricasTalkingMessage()) | ||
->content('Your SMS message content')->to(11111111); method in your event class | ||
" | ||
); | ||
} | ||
} |