与LocaSMS服务集成的短信整合。
0.0.2
2021-07-12 15:04 UTC
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- ext-mbstring: *
- illuminate/http: ^8.0
- illuminate/support: ^8.0
Requires (Dev)
- nunomaduro/collision: dev-stable
- orchestra/testbench: 6.x-dev
- phpunit/phpunit: 9.5.x-dev
README
在您的 composer.json 中添加此包并更新 composer。这将下载包及其依赖库。
composer require lsnepomuceno/laravel-locasms
开始前先注册
在 LocaSMS 上注册以获取登录名和密码。
用法
<?php use LSNepomuceno\LaravelLocasms\SMS; class ExampleController() { public function dummyFunction(){ $sms = new SMS('login', 'password'); // IMPORTANT: // - Service is limited to 200 characters // - Sending SMS works only in Brazil // - The country code has been discarded $response = $sms->send(['+55(27)99999-8888', '2799988-7766'], 'Test message from Laravel integration!!!')); // See http client for more details: https://laravel.net.cn/docs/8.x/http-client dd($respone->body()); } }