unisharp / sms
Laravel的Aptg SMS客户端
dev-master
2018-10-30 07:59 UTC
Requires
- php: >=5.5.0
- illuminate/log: >=5.0.0
- illuminate/support: >=5.0.0
This package is auto-updated.
Last update: 2024-09-15 15:23:16 UTC
README
目前仅支持APTG SMS。
安装
composer require unisharp/sms
使用方法
使用外观
编辑.env
APTG_MDN=xxx
APTG_UID=yyy
APTG_UPASS=zzz
SMS_IS_DRY_RUN=false // If set to true, no sms will be sent. Only log messages are recorded.
代码
\Sms::send($phone_number, $message); // boolean value is returned.
手动传递凭证
$client = new AptgSmsClient('your APTG_MDN', 'your APTG_UID', 'your APTG_UPASS');
$response = $client->send([$phone_number], $message); // Instance of AptgClient is returned.