Search by

humix / sms

humxuan

Package info

github.com/humxuan/sms

pkg:composer/humix/sms

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

v3.0.0 2026-08-10 05:56 UTC

This package is auto-updated.

Last update: 2026-09-10 06:09:17 UTC


README

兼容 overtrue/easy-sms 协程化,方便 Hyperf 用户使用。详细用法见:https://github.com/overtrue/easy-sms

环境要求: Hyperf 3.2、PHP >= 8.2

1.安装

composer require humx/hyperf-sms:2.0.0

2.发布配置

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

3.基本调用


use Humx\HyperfSms\Contract\SmsInterface;
use Hyperf\Context\ApplicationContext;

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