hzx / hyperf-sms
Hyperf 短信发送组件
v1.0.0
2022-02-14 07:37 UTC
Requires
- php: >=7.3
- hyperf/guzzle: v2.1.*
- overtrue/easy-sms: ^2.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.14
- mockery/mockery: ^1.0
- phpstan/phpstan: ^0.12
- phpunit/phpunit: >=7.0
- swoole/ide-helper: dev-master
- symfony/var-dumper: ^5.1
This package is auto-updated.
Last update: 2024-12-14 13:31:33 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 ], ]);