PHP code example of skychf / aliyunmns

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

    

skychf / aliyunmns example snippets



    return [
        'end_point'         => env('ALIYUN_END_POINT', null),
        'access_id'         => env('ALIYUN_ACCESS_ID', null),
        'access_key'        => env('ALIYUN_ACCESS_KEY', null),
        'topic_name'        => env('ALIYUN_TOPIC_NAME', 'sms.topic-cn-hangzhou'),
        'sms_sign_name'     => env('ALIYUN_SMS_SIGN_NAME',null),
        'sms_template_code' => env('ALIYUN_SMS_TEMPLATE_CODE',null)
    ];


    public function index(Sms $sms)
    {
        $template_args = ["code" => "1234"];
        $result = $sms->send($mobile, $template_args);
    }


php artisan vendor:publish