huangdijia / laravel-twsms
twsms for laravel
1.0.3
2019-09-04 05:48 UTC
Requires
- php: >=7.0.0
- huangdijia/laravel-curl: ^1.0
- illuminate/console: ^5.5|^5.6|^5.7|^5.8|^6.0
- illuminate/support: ^5.5|^5.6|^5.7|^5.8|^6.0
This package is auto-updated.
Last update: 2024-12-05 19:01:34 UTC
README
Requirements
- PHP >= 7.0
- Laravel >= 5.5
Installation
composer require huangdijia/laravel-twsms
Publish
php artisan vendor:publish --provider="Huangdijia\Twsms\Providers\TwsmsServiceProvider"
Configure
TWSMS_ACCOUNT=account TWSMS_PASSWORD=password TWSMS_TYPE=now TWSMS_ENCODING=big5 TWSMS_VLDTIME= TWSMS_DLVTIME=
Usage
Command
php artisan twsms:send [mobile] [message]
Facade
Huangdijia\Twsms\Facades\Twsms::send($mobile, $message);
Container
app('sms.twsms')->send($mobile, $message);
Error
$twsms = app('sms.twsms'); if (!$twsms->send($mobile, $message)) { dd($twsms->getError()); }