MessagingSmsProviderTwilio
Reference for the MessagingSmsProviderTwilio module: a Twilio SMS provider registered as a vendor of the MessagingSms type. It exposes a single static function that sends a text message through the Twilio REST API using configured account credentials.
This page is a pure reference. For how the framework fits together, see the Guide.
MessagingSmsProviderTwilio- send an SMS through Twilio.
MessagingSmsProviderTwilio
The Twilio SMS provider. Its single function sends a message through the Twilio
REST client, reading the account credentials from config. It is registered as the
twilio vendor of the MessagingSms type and provides that type's
send implementation.
Send
MessagingSmsProviderTwilio::Send(string $from, string $to, string $text): void
Send an SMS without saving it into the database, useful when sending error messages, for instance when the database is down. Throws when the send fails.
| Name | Type | Description |
|---|---|---|
$from | string | The sending phone number. |
$to | string | The recipient phone number. |
$text | string | The message body. |
Returns void