Skip to content

Commit d5502c6

Browse files
Updated documentation
1 parent 184a8fc commit d5502c6

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,23 @@ You can also access this via the Facade as well:
111111
$sdk = Twilio::getTwilio();
112112
```
113113

114+
##### Pass as many optional parameters as you want
115+
116+
If you want to pass on extra optional parameters to the `messages->sendMessage(...)` method [from the Twilio SDK](https://twilio-php.readthedocs.io/en/latest/api/rest.html#Services_Twilio_Rest_Messages::sendMessage), you can do so
117+
by adding to the `message` method. All arguments are passed on, and the `from` field is prepended from configuration.
118+
119+
```php
120+
$twilio->message($to, $message, $mediaUrls, $params);
121+
// passes all these arguments on.
122+
```
123+
124+
The same is true for the [call method](https://twilio-php.readthedocs.io/en/latest/api/rest.html#Services_Twilio_Rest_Calls::create).
125+
126+
```php
127+
$twilio->call($to, $message, $params);
128+
// passes all these arguments on.
129+
```
130+
114131
#### Dummy class
115132

116133
There is a dummy implementation of the `TwilioInterface` available: `Aloha\Twilio\Dummy`. This class

0 commit comments

Comments
 (0)