hzx/hyperf-sms

Hyperf 短信发送组件

v1.0.0 2022-02-14 07:37 UTC

This package is auto-updated.

Last update: 2022-09-14 09:02:26 UTC


README

composer require hzx/hyperf-sms

2、发布配置

php bin/hyperf.php vendor:publish hzx/hyperf-sms

3.基本调用

use Hzx\HyperfSms\Contract\SmsInterface;
use Hyperf\Utils\ApplicationContext;

$easySms = ApplicationContext::getContainer()->get(SmsInterface::class);
$result = $easySms->send(18888888888, [
        'content'  => '登录验证码{1},请于5分钟内填写',
        'template' => '1111',
        'data' => [
        'code' => 1234
    ],
]);