huangdijia/laravel-sms
sms for laravel
7,402
2
| Install | |
|---|---|
composer require huangdijia/laravel-sms |
|
| Latest Version: | 1.1.7 |
| PHP: | >=7.2.0 |
| Laravel: | 7 · 8 |
| License: | MIT |
| Last Updated: | Nov 24, 2020 |
| Links: | GitHub · Packagist |
Maintainer: huangdijia
Laravel-sms
Installation
Install package
composer require huangdijia/laravel-sms
Install configure
php artisan sms:install
Uage
Simple to send a message
use Huangdijia\Sms\Facades\Sms;
Sms::to('phone number')->content('message content')->send();
Check send result
$response = Sms::to('phone number')->content('message content')->send();
if ($response->successful()) {
// success
}
Throwing Exceptions
$response = Sms::to('phone number')->content('message content')->send();
$response->throw();
Switch sms factory
Sms::use('another')->to('phone number')->content('message content')->send();
With Validate Rules
Sms::withRules([
'to' => 'required|numeric|....',
'content' => 'required|...',
], [
'to.required' => ':attribute cannot be empty!',
'content.required' => ':attribute cannot be empty!',
// more messages
])->to()->content()->send();
Related Packages
alhaji-aki/laravel-sms
A package that allows developers integrate sms providers and provide a common ap...
5,952
2
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 1.1.7 | >=7.2.0 | ^7.0| | MIT | |
| 1.1.6 | >=7.2.0 | ^7.0| | MIT | |
| 1.1.5 | >=7.2.0 | ^7.0| | MIT | |
| 1.1.4 | >=7.2.0 | ^7.0| | MIT | |
| 1.1.3 | >=7.2.0 | ^7.0| | MIT | |
| 1.1.2 | >=7.2.0 | ^7.0| | MIT | |
| 1.1.1 | >=7.2.0 | ^7.0 | MIT | |
| 1.1.0 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.11 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.10 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.9 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.8 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.7 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.6 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.5 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.4 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.3 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.2 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.1 | >=7.2.0 | ^7.0 | MIT | |
| 1.0.0 | >=7.2.0 | ^7.0 | MIT |

