havryliv / yii2-twillio
yii 2 twillio integration
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 7
Type:yii2-extension
Requires
- twilio/sdk: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-28 19:20:30 UTC
README
twillio for yii 2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist havryliv/yii2-twillio "*"
or add
"havryliv/yii2-twillio": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, you should configure it in the application configuration like the following,
'components' => [ 'twillio' => [ 'class' => 'havryliv\twillio\Twillio', 'sid' => 'your_sid', 'token' => 'your_token', ] ]
** Creating a customer
$twillio = Yii::$app->twillio; $message = $twillio->getClient()->account->messages->sendMessage( '9991231234', // From a valid Twilio number '8881231234', // Text this number "Hello monkey!" ) print $message->sid;