huangdijia / laravel-smspro
smspro for laravel
1.1.0
2019-09-20 08:48 UTC
Requires
- php: >=7.0.0
- illuminate/console: ^5.7|^5.8|^6.0|^7.0
- illuminate/support: ^5.7|^5.8|^6.0|^7.0
README
Requirements
- PHP >= 7.0
- Laravel >= 5.5
Installation
composer require huangdijia/laravel-smspro
Publish
php artisan vendor:publish --provider="Huangdijia\Smspro\SmsproServiceProvider"
Configure
SMSPRO_USERNAME=account SMSPRO_PASSWORD=password SMSPRO_SENDER=sender
Usage
Command
php artisan smspro:send [mobile] [message]
Facade
Huangdijia\Smspro\Facades\Smspro::send($mobile, $message);
Container
app('sms.smspro')->send($mobile, $message);
Error
$smspro = app('sms.smspro'); if (!$smspro->send($mobile, $message)) { dd($smspro->getError()); }