2017 © Pedro Peláez
 

library yii2-twilio

This component is YII2 wrapper for Twilio PHP module. Forked from filipajdacic/yii2-twilio to publish stable

image

unimodern/yii2-twilio

This component is YII2 wrapper for Twilio PHP module. Forked from filipajdacic/yii2-twilio to publish stable

  • Wednesday, August 31, 2016
  • by Unimodern
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Twilio for Yii2

This component is YII2 wrapper for Twilio PHP SDK., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist filipajdacic/yii2-twilio "*"

or add, (*4)

"filipajdacic/yii2-twilio": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by putting this in your config:, (*6)

'components' => array(
    ...
    'Yii2Twilio' => array(
        'class' => 'filipajdacic\yiitwilio\YiiTwilio',
        'account_sid' => 'YOUR_TWILIO_ACCOUNT_SID_HERE',
        'auth_key' => 'YOUR_TWILIO_AUTH_KEY_HERE', 
    ),
    ...
);

After you have configured a component, you can use it for example in this way:, (*7)


$twilioService = Yii::$app->Yii2Twilio->initTwilio(); try { $message = $twilioService->account->messages->create(array( "From" => "+12345678901", // From a valid Twilio number "To" => "+12345678901", // Text this number "Body" => "Hello from my Yii2 Application!", )); } catch (\Services_Twilio_RestException $e) { echo $e->getMessage(); }

For more SDK functions and usage documentation feel free to visit official Twilio PHP SDK documentation section here., (*8)

Resources

This component on YiiFramework.com, (*9)

Twilio.com, (*10)

If you have any questions, feel free to ask., (*11)

The Versions

31/08 2016

dev-master

9999999-dev

This component is YII2 wrapper for Twilio PHP module. Forked from filipajdacic/yii2-twilio to publish stable

  Sources   Download

MIT

The Requires

 

by Filip Ajdacic

extension yii2 sms video voice twillio

16/07 2016

1.0.0

1.0.0.0

This component is YII2 wrapper for Twilio PHP module. Forked from filipajdacic/yii2-twilio to publish stable

  Sources   Download

MIT

The Requires

 

by Filip Ajdacic

extension yii2 sms video voice twillio