PHPackages                             xutl/laravel-sms - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. xutl/laravel-sms

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

xutl/laravel-sms
================

This is a SMS.

1.0.2(7y ago)18281MITPHP

Since Jul 3Pushed 7y agoCompare

[ Source](https://github.com/xutl/laravel-sms)[ Packagist](https://packagist.org/packages/xutl/laravel-sms)[ RSS](/packages/xutl-laravel-sms/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

laravel-sms
===========

[](#laravel-sms)

This is a sms expansion for the laravel

[![License](https://camo.githubusercontent.com/ed3e6da6d799bcf5cdd572e87234c82b0337f7ad70739ad52de46315960d9831/68747470733a2f2f706f7365722e707567782e6f72672f7875746c2f6c61726176656c2d736d732f6c6963656e73652e737667)](https://packagist.org/packages/xutl/laravel-sms)[![Latest Stable Version](https://camo.githubusercontent.com/07eac59f9a522245a1067b952654ab3ab0dc2f798da785466b23136a2db92bfa/68747470733a2f2f706f7365722e707567782e6f72672f7875746c2f6c61726176656c2d736d732f762f737461626c652e706e67)](https://packagist.org/packages/xutl/laravel-sms)[![Total Downloads](https://camo.githubusercontent.com/4174aff7b5da6b6f0e219011b9f160e5c3db5d0f86527e5890ea73dec7c73955/68747470733a2f2f706f7365722e707567782e6f72672f7875746c2f6c61726176656c2d736d732f646f776e6c6f6164732e706e67)](https://packagist.org/packages/xutl/laravel-sms)

平台支持
----

[](#平台支持)

- [阿里云](https://www.aliyun.com/)
- [云片](https://www.yunpian.com)
- [Submail](https://www.mysubmail.com)
- [螺丝帽](https://luosimao.com/)
- [容联云通讯](http://www.yuntongxun.com)
- [互亿无线](http://www.ihuyi.com)
- [聚合数据](https://www.juhe.cn)
- [SendCloud](http://www.sendcloud.net/)
- [百度云](https://cloud.baidu.com/)
- [华信短信平台](http://www.ipyy.com/)
- [253云通讯（创蓝）](https://www.253.com/)
- [融云](http://www.rongcloud.cn)
- [天毅无线](http://www.85hu.com/)
- [腾讯云 SMS](https://cloud.tencent.com/product/sms)
- [阿里大于](https://www.alidayu.com/)(不推荐使用，请使用阿里云)
- [阿凡达数据](http://www.avatardata.cn/)

环境需求
----

[](#环境需求)

- PHP &gt;= 5.6

Installation
------------

[](#installation)

```
composer require xutl/laravel-sms
```

for Laravel
-----------

[](#for-laravel)

This service provider must be registered.

```
// config/app.php

'providers' => [
    '...',
    XuTL\Sms\SmsServiceProvider::class,
];
```

add the config file: config/sms.php

add config

```
use Overtrue\EasySms\Strategies\OrderStrategy;

return [
    // HTTP 请求的超时时间（秒）
    'timeout' => 5.0,

    /*
    |--------------------------------------------------------------------------
    | Default Setting
    |--------------------------------------------------------------------------
    |
    | This option defines the default sms gateway that gets used when writing
    | messages to the sms. The name specified in this option should match
    | one of the gateways defined in the "gateways" configuration array.
    |
    */
    'default' => [
        // 网关调用策略，默认：顺序调用
        'strategy' => OrderStrategy::class,

        /*
        |--------------------------------------------------------------------------
        | Default Gateways
        |--------------------------------------------------------------------------
        |
        | This option defines the default sms gateway that gets used when writing
        | messages to the sms. The name specified in this option should match
        | one of the gateways defined in the "gateways" configuration array.
        |
        */
        'gateways' => [

        ],
    ],

    /*
    |--------------------------------------------------------------------------
    | Log Gateways
    |--------------------------------------------------------------------------
    |
    | Here you may configure the sms gateways for your application.  This gives
    | you a variety of powerful log handlers / formatters to utilize.
    |
    | Available Drivers: "aliyun", "alidayu", "yunpian", "submail",
    |                    "errorlog", "luosimao", "yuntongxun", "huyi"
    |                    "juhe", "sendcloud", "baidu", "huaxin", "chuanglan"
    |                    "rongcloud", "tianyiwuxian", "twilio", "qcloud", "avatardata"
    |
    */
    'gateways' => [
        //Doc
        // https://github.com/overtrue/easy-sms
    ],
];
```

Use
---

[](#use)

```
try {
    $res = sms('13800138000', ['content'  => '您的验证码为: 6379','template' => '259734', 'data' => [6379]]);
    print_r($res);
} catch (InvalidArgumentException $e) {
    print_r($e->getMessage());
} catch (NoGatewayAvailableException $e) {
    print_r($e->getMessage());
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~84 days

Total

3

Last Release

2702d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/87b658aa9d49e0c80cfc609fa2b9dc6d615672b1d895f421f751945a0e394087?d=identicon)[larvacent](/maintainers/larvacent)

---

Top Contributors

[![xutl](https://avatars.githubusercontent.com/u/20939388?v=4)](https://github.com/xutl "xutl (18 commits)")

---

Tags

laravellaravel-packagesmssms-apilaravelsms

### Embed Badge

![Health badge](/badges/xutl-laravel-sms/health.svg)

```
[![Health](https://phpackages.com/badges/xutl-laravel-sms/health.svg)](https://phpackages.com/packages/xutl-laravel-sms)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
