PHP code example of hardywen / phpsms-l4

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

    

hardywen / phpsms-l4 example snippets


providers = [
  'Hardywen\PhpSms\PhpSmsServiceProvider'
]

aliases = [
	'SMS'=>'Hardywen\PhpSms\Facade\Sms',
]
 artisan config:publish hardywen/phpsms-l4

$result = SMS::make()->to('138xxxxxxxx')->template([
        'Ucpaas'     => '1233',
        'YunTongXun' => '1211'
    ])->data(['123123', 10])->content('something')->send();
    
if($result['success'] == true){
   //发送成功,做你想做的事
}else{
  //发送失败
}