bryglen/yii2-twillio

yii 2 twillio integration

Installs: 2 461

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 3

Forks: 7

Open Issues: 2

Type:yii2-extension

dev-master 2015-08-05 12:05 UTC

This package is not auto-updated.

Last update: 2024-05-07 01:23:19 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 bryglen/yii2-twillio "*"

or add

"bryglen/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' => 'bryglen\yii2-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;