composer require huangdijia/laravel-sms
php artisan sms:install
use Huangdijia\Sms\Facades\Sms;
Sms::to('phone number')->content('message content')->send();
$response = Sms::to('phone number')->content('message content')->send();
if ($response->successful()) {
// success
}
$response = Sms::to('phone number')->content('message content')->send();
$response->throw();
Sms::use('another')->to('phone number')->content('message content')->send();
Sms::withRules([
'to' => 'required|numeric|....',
'content' => 'required|...',
], [
'to.required' => ':attribute cannot be empty!',
'content.required' => ':attribute cannot be empty!',
// more messages
])->to()->content()->send();