You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+29-3Lines changed: 29 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,23 @@
1
1
# CMSMS notifications channel for Laravel 5.3
2
2
3
+
[](https://packagist.org/packages/laravel-notification-channels/cmsms)
@@ -52,7 +62,7 @@ Add your CMSMS Product Token and default originator (name or number of sender) t
52
62
...
53
63
```
54
64
55
-
Notice: The originator can contain a maximum of 11 alfanumeric characters.
65
+
Notice: The originator can contain a maximum of 11 alphanumeric characters.
56
66
57
67
## Usage
58
68
@@ -72,13 +82,29 @@ class VpsServerOrdered extends Notification
72
82
73
83
public function toCmsms($notifiable)
74
84
{
75
-
return (new CmsmsMessage("Your {$notifiable->service} was ordered!"));
85
+
return CmsmsMessage::create("Your {$notifiable->service} was ordered!");
76
86
}
77
87
}
78
88
```
79
89
90
+
91
+
In order to let your Notification know which phone numer you are targeting, add the `routeNotificationForCmsms` method to your Notifiable model.
92
+
80
93
**Important note**: CMCMS requires the recipients phone number to be in international format. For instance: 0031612345678
81
94
95
+
```php
96
+
public function routeNotificationForCmsms()
97
+
{
98
+
return '0031612345678';
99
+
}
100
+
```
101
+
102
+
### Available message methods
103
+
104
+
-`body('')`: Accepts a string value for the message body.
105
+
-`originator('')`: Accepts a string value between 1 and 11 characters, used as the message sender name.
106
+
-`reference('')`: Accepts a string value for your message reference. This information will be returned in a status report so you can match the message and it's status. Restrictions: 1 - 32 alphanumeric characters and reference will not work for demo accounts.
107
+
82
108
## Changelog
83
109
84
110
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
0 commit comments