承接 unimodern/yii2-twilio 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

unimodern/yii2-twilio

Composer 安装命令:

composer require unimodern/yii2-twilio

包简介

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

README 文档

README

This component is YII2 wrapper for Twilio PHP SDK.

Installation

The preferred way to install this extension is through composer.

Either run

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

or add

"filipajdacic/yii2-twilio": "*"

to the require section of your composer.json file.

Usage

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

'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:

    $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.

Resources

This component on YiiFramework.com

Twilio.com

If you have any questions, feel free to ask.

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-07-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固