Skip to content

bryglen/yii2-twillio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Yii 2 Twillio

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;

About

yii 2 twillio integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages