PHP code example of vicleos / aliyun

1. Go to this page and download the library: Download vicleos/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/ */

    

vicleos / aliyun example snippets


'providers' => [
    Vicleos\Aliyun\AliyunServiceProvider::class,
]

'aliases' => [
    'Aliyun' => Vicleos\Aliyun\Facades\Aliyun::class,
]

 use Aliyun;

 $mns = Aliyun::createClient('mns');    
 $ret = $mns->SendSMSMessage(13888888888,'SMS_14695416',['customer'=>'测试']);   
 // 成功返回 True, 失败返回False
 
sh
php artisan vendor:publish --provider="Vicleos\Aliyun\AliyunServiceProvider"