PHPackages                             mmhk/mm-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. mmhk/mm-laravel-sms

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

mmhk/mm-laravel-sms
===================

SMS provider for Laravel

1.3(5y ago)010Apache-2.0PHPPHP &gt;=7CI failing

Since Mar 5Pushed 5y ago2 watchersCompare

[ Source](https://github.com/MMHK/mm-laravel-sms)[ Packagist](https://packagist.org/packages/mmhk/mm-laravel-sms)[ RSS](/packages/mmhk-mm-laravel-sms/feed)WikiDiscussions master Synced 2d ago

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

Laravel SMS Provider for MMHK
-----------------------------

[](#laravel-sms-provider-for-mmhk)

一个发送 `SMS` 的 service 接口， 现在只集成了 [AccessYou](http://www.accessyou.com/) [xGate](https://www.xgate.com/sms-gateway.html) [WaveCell](https://wavecell.com/) 等项目中常用的第三方`SMS`服务。

### 安装

[](#安装)

```
composer require mmhk/mm-laravel-sms
```

`composer` 安装好了之后，将provider添加到 `config/app.php` 的 `providers` 数组里面。

```
\MMHK\SMS\SMSServiceProvider::class,
```

**Laravel 5.5** 自带自动发现功能, 所以并不需要手动添加provider。

复制配置文件到 `config` 目录下

```
php artisan vendor:publish --provider="MMHK\SMS\SMSServiceProvider" --tag=config
```

### 配置

[](#配置)

配置文件存放在 `config/sms-service.php`， 具体内容如下：

```
[

    //是否伪装已经发送SMS了
    'pretend' => env('SMS_PRETEND', true),

    // 默认的短信服务商
    'default' => env('SMS_DRIVER', 'accessYou'),

    //找回密码时临时密码的生命周期
    'lifetime' => env('SMS_AUTH_LIFE_TIME',30),

    /**
     * 是否使用队列
     */
    'queue' => env('SMS_QUEUE', false),

    /**
     * SMS服务提供商配置
     */
    'services' => [

        'accessYou' => [
            //具体实现类
            'driver' => '\MMHK\SMS\Gateways\AccessYou',
            //实现类的配置
            'config' => [
                'accountno' => '',
                'pwd'       => '',
                'from'      => '',
                'size'      => 'l',
            ]
        ],

        'xGate' => [
            //具体实现类
            'driver' => '\MMHK\SMS\Gateways\XGate',
            //实现类的配置
            'config' => [
                'UserID'          => '',
                'UserPassword'    => '',
                'MessageType'     => '',
                'MessageLanguage' => '',
                'Senderid'        => '',
            ]
        ],

        'WaveCell' => [
            //具体实现类
            'driver' => '\MMHK\SMS\Gateways\WaveCell',
            //实现类的配置
            'config' => [
                'api_key'     => '',
                'account_id'  => '',
                'sender_id'   => '',
            ],
        ],
    ],

    //需要开发测试环境接收短信的白名单
    'whitelist' => [

    ],
];
```

### 使用例子

[](#使用例子)

```
app('sms')->send(new \MMHK\SMS\Message([
    'to' => 'your mobile number',
    'content' => 'Hello World!',
]));
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

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 ~393 days

Total

3

Last Release

1839d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/32e4f0f68d33dbaf585fd434123ae14b1ebf6acb76cd4da723fefa1b6cd1cc9c?d=identicon)[Sam.Zhou](/maintainers/Sam.Zhou)

---

Top Contributors

[![mm-sam](https://avatars.githubusercontent.com/u/10527951?v=4)](https://github.com/mm-sam "mm-sam (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M79](/packages/google-cloud-core)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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