PHP code example of huangdijia / laravel-twsms

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

    

huangdijia / laravel-twsms example snippets


Huangdijia\Twsms\Facades\Twsms::send($mobile, $message);

app('sms.twsms')->send($mobile, $message);

$twsms = app('sms.twsms');

if (!$twsms->send($mobile, $message)) {
    dd($twsms->getError());
}
bash
php artisan vendor:publish --provider="Huangdijia\Twsms\Providers\TwsmsServiceProvider"
bash
php artisan twsms:send [mobile] [message]