1. Go to this page and download the library: Download larva/laravel-sms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Overtrue\EasySms\Strategies\OrderStrategy;
return [
// HTTP 请求的超时时间(秒)
'timeout' => 5.0,
/*
|--------------------------------------------------------------------------
| Default Setting
|--------------------------------------------------------------------------
|
| This option defines the default sms gateway that gets used when writing
| messages to the sms. The name specified in this option should match
| one of the gateways defined in the "gateways" configuration array.
|
*/
'default' => [
// 网关调用策略,默认:顺序调用
'strategy' => OrderStrategy::class,
/*
|--------------------------------------------------------------------------
| Default Gateways
|--------------------------------------------------------------------------
|
| This option defines the default sms gateway that gets used when writing
| messages to the sms. The name specified in this option should match
| one of the gateways defined in the "gateways" configuration array.
|
*/
'gateways' => [
],
],
/*
|--------------------------------------------------------------------------
| Log Gateways
|--------------------------------------------------------------------------
|
| Here you may configure the sms gateways for your application. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "aliyun", "alidayu", "yunpian", "submail",
| "errorlog", "luosimao", "yuntongxun", "huyi"
| "juhe", "sendcloud", "baidu", "huaxin", "chuanglan"
| "rongcloud", "tianyiwuxian", "twilio", "qcloud", "avatardata"
|
*/
'gateways' => [
//Doc
// https://github.com/overtrue/easy-sms
],
];