zing/laravel-sms
Larablocks Analysis
zing/laravel-sms works with Laravel 8 to 13 (latest release 6.7.0, Mar 27, 2026).
Laravel 6 and 7 in earlier releases.
Recommendation checks
PromisingPromising: maintained and up to date, meets 2 of 4 checks; not yet widely used.
- Works with Laravel 13, the current version
- Released in the last 12 months (Mar 27, 2026)
- 53 downloads a month (needs 10,000)
- 8 GitHub stars (needs 100)
State
Maintained- Last stable release: Mar 27, 2026.
- 1 release in the last 12 months.
- First released: Apr 10, 2020.
- Monthly downloads: 53.
- 2 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Nov 27, 2026.
| Install | |
|---|---|
composer require zing/laravel-sms |
|
| Latest Version: | 6.7.0 |
| PHP: | ^8.0 |
| Laravel: | 8 – 13 |
| Older releases: | 6 · 7 |
| License: | MIT |
| Last Updated: | Nov 24, 2026 |
| Links: | GitHub · Packagist |
Laravel Sms
Laravel Sms is used to notify via sms and send a message.
Thanks
Many thanks to:
-
JetBrains for the excellent PhpStorm IDE and providing me with an open source license to speed up the project development.
Requirements
Installation
Composer
Execute the following command to get the latest version of the package:
composer require zing/laravel-sms
Laravel
Publish Configuration
php artisan vendor:publish --provider "Zing\LaravelSms\SmsServiceProvider"
Add Connections
This package based on overtrue/easy-sms, driver is the gateway.
Usage
Channel
Create a Notification
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
class Verification extends Notification implements ShouldQueue
{
use Queueable;
protected $code;
/**
* Verification constructor.
*
* @param $code
*/
public function __construct($code)
{
$this->code = $code;
}
public function via()
{
return ['sms'];
}
public function toSms($notifiable)
{
return "验证码 {$this->code},您正在进行身份验证,打死也不要告诉别人哦!";
}
}
Add notification route for sms to your notifiable
use Illuminate\Notifications\Notifiable;
class User
{
use Notifiable;
public function routeNotificationForSms($notification)
{
return $this->phone;
}
}
Send notification
use Illuminate\Support\Facades\Notification;
$user = new User();
// use Notifiable Trait
$user->notify(new Verification('1111'));
// use Notification Facade
Notification::send($user, new Verification('1111'));
Send to anonymous notifiable
use Illuminate\Support\Facades\Notification;
use Zing\LaravelSms\SmsNumber;
use Zing\LaravelSms\Channels\SmsChannel;
// use channel class name
Notification::route(SmsChannel::class, new SmsNumber(18188888888, 86))->notify(new Verification('1111'));
// use channel alias
Notification::route('sms', new SmsNumber(18188888888, 86))->notify(new Verification('1111'));
Facade
Send Message
use Zing\LaravelSms\Facades\Sms;
// use default connection
Sms::send(18188888888, 'test message.');
// use specific connection
Sms::connection('null')->send(18188888888, 'test message.');
// or
Sms::via('null')->send(18188888888, 'test message.');
Specific usage
Use specific connection for notification
NOTE: Only support for Zing\LaravelSms\SmsMessage
use Zing\LaravelSms\SmsMessage;
public function toSms($notifiable)
{
return (new SmsMessage())->onConnection('log');
}
Make PhoneNumber notifiable
NOTE: Only support for Zing\LaravelSms\SmsNumber
use Zing\LaravelSms\SmsNumber;
(new SmsNumber(18188888888))->notify(new Verification('1111'));
License
Laravel Sms is open-sourced software licensed under the MIT license.
Alternatives to zing/laravel-sms
Easily send Brevo transactional email and sms with Laravel notifier.
Laravel client for the uBill SMS API: sends, personalized batches, delivery repo...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 6.7.0 | ^8.0 | ^8.0 || | MIT | |
| 6.6.0 | ^8.0 | ^8.0 || | MIT | |
| 6.5.0 | ^8.0 | ^8.0 || | MIT | |
| 6.4.0 | ^8.0 | ^8.0 || | MIT | |
| 6.3.1 | ^8.0 | ^8.0 || | MIT | |
| 6.3.0 | ^8.0 | ^8.0 || | MIT | |
| 6.2.0 | ^8.0 | ^8.0 || | MIT | |
| 6.1.0 | ^8.0 | ^8.0 || | MIT | |
| 6.0.0 | ^8.0 | ^8.0 || | MIT | |
| 5.1.2 | ^7.3 || | ^8.0 || | MIT | |
| 5.1.1 | ^7.3 || | ^8.0 || | MIT | |
| 5.1.0 | ^7.3 || | ^8.0 || | MIT | |
| 5.0.3 | ^7.3 || | ^8.0 || | MIT | |
| 5.0.2 | ^7.3 || | ^8.0 || | MIT | |
| 5.0.1 | ^7.3 || | ^8.0 || | MIT | |
| 5.0.0 | ^7.3 || | ^8.0 || | MIT | |
| 4.3.1 | ^7.2 || | ^6.8 || | MIT | |
| 4.3.0 | ^7.2 || | ^6.8 || | MIT | |
| 4.2.1 | ^7.2 || | ^6.8 || | MIT | |
| 4.2.0 | ^7.2 || | ^6.8 || | MIT | |
| 4.1.0 | ^7.2 || | ^6.8 || | MIT | |
| 4.0.0 | ^7.2 || | ^6.8 || | MIT | |
| 3.6.1 | ^7.2 || | ^6.8 || | MIT | |
| 3.6.0 | ^7.2 || | ^6.8 || | MIT | |
| 3.5.8 | ^7.2 || | ^6.8 || | MIT | |
| 3.5.7 | ^7.2 || | ^6.8 || | MIT | |
| 3.5.6 | ^7.2 || | ^6.8 || | MIT | |
| 3.5.5 | ^7.2 || | ^6.8 || | MIT | |
| 3.5.4 | ^7.2 || | ^6.8 || | MIT | |
| 3.5.3 | ^7.2 || | ^6.8 || | MIT |
Showing the latest 30 of 70. See every release on Packagist
Pre-releases (7)
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.0.0-alpha.5 | ^7.2.5 | ^6.8| | MIT | |
| 3.0.0-alpha.4 | ^7.3 | ^6.0| | MIT | |
| 3.0.0-alpha.3 | ^7.3 | ^6.0| | MIT | |
| 3.0.0-alpha.2 | ^7.3 | ^6.0| | MIT | |
| 3.0.0-alpha.1 | ^7.2.5 | ^6.0| | MIT | |
| 2.0.0-alpha.2 | ^7.2.5 | ^6.0| | MIT | |
| 2.0.0-alpha.1 | ^7.2.5 | ^6.0| | MIT |