PHP code example of phplife / laravel-aliyun
1. Go to this page and download the library: Download phplife/laravel-aliyun 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/ */
phplife / laravel-aliyun example snippets
//注入sms
public function send(Sms $sms)
{
//短信发送
$sms->sendSms('手机号', '签名名称', '模板CODE', '可选,模板参数', '可选,流水号', '可选,扩展码');
}
'providers' => array(
// ...
Aliyun\Provider\AliyunServiceProvider::class,
);
复制src/Config/aliyun.php到laravel config文件夹中进行自定义配置