gud3/yii2-sms
Composer 安装命令:
composer require gud3/yii2-sms
包简介
The message sender. The package includes sending for service turbosms.
README 文档
README
The message sender. The package includes sending for service TurboSMS, SmsAPI.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist gud3/yii2-sms "*"
or add
"gud3/yii2-sms": "*"
to the require section of your composer.json file.
Usage
To use this extension, simply add the following code in your application configuration:
sender name for turbo sms by default 'Msg'
return [ //.... 'components' => [ 'sms' => [ 'class' => 'gud3\sms\Client', 'sender' => 'Display name', 'service' => [ 'class' => 'gud3\sms\Services\SmsApi', // or TurboSms 'login' => '***', 'password' => '***', ], ], ], ];
You can then send an sms in queue as follows:
Yii::$app->sms->send('+**********', 'This is text of test message'); Yii::$app->sms->send(['+**********', '+**********'], 'This is text of test message');
统计信息
- 总下载量: 59
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2017-04-02