定制 avator/yii2-turbosms 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

avator/yii2-turbosms

最新稳定版本:1.0.9

Composer 安装命令:

composer require avator/yii2-turbosms

包简介

Yii2 turbosms

README 文档

README

Yii2 send sms from Turbosms.ua by SOAP

Requirements

  • PHP >=5.4.0
  • Install and Enable extension=php_soap.dll in your php.ini file

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist avator/yii2-turbosms "*"

or add

"avator/yii2-turbosms": "*"

to the require section of your composer.json file.

Subsequently, run

./yii migrate/up --migrationPath=@vendor/avator/yii2-turbosms/migrations

Basic setup

You should:

Configuration

Add the following in your config:

<?php
...
    'components' => [
        'turbosms' => [
            'class' => 'avator\turbosms\Turbosms',
            'sender' => 'your_sender',
            'login' => 'your_login',
            'password' => 'your_password',
        ],
        ...
    ],
...

If you want test sms in debug mode change config:

<?php
...
    'components' => [
        'turbosms' => [
            'class' => 'avator\turbosms\Turbosms',
            'sender' => 'your_sender',
            'login' => 'your_login',
            'password' => 'your_password',
            'debug' => true,
        ],
        ...
    ],
...

in debug mode sms not send only add to db table.

Usage

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

 <?php Yii::$app->turbosms->send('test', '+380XXXXXXXXX'); ?>

TODO

  • Translate message
  • Save log to file

License

yii2-turbosms is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

统计信息

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

GitHub 信息

  • Stars: 10
  • Watchers: 3
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-01-31