PHPackages                             mrlian/smsservice - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. mrlian/smsservice

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

mrlian/smsservice
=================

Sms verification code for Laravel 4

17PHP

Since Oct 9Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lavenkin/smsservice)[ Packagist](https://packagist.org/packages/mrlian/smsservice)[ RSS](/packages/mrlian-smsservice/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

短信验证码 For Laravel 4
-------------------

[](#短信验证码-for-laravel-4)

目前接入平台有LuosiMao&amp;YunPian后期将扩展其它平台

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

[](#installation)

Require this package with composer:`composer require mrlian/smsservice`

Usage
-----

[](#usage)

Find the `providers` key in `config/app.php` and register the SmsService Service Provider.

```
'providers' => [
    // ...
    'Mrlian\Smsservice\SmsserviceServiceProvider',
]

```

Find the aliases key in `config/app.php`.

```
'aliases' => [
    // ...
    'SmsService' => 'Mrlian\Smsservice\Vendor\SmsService',
]

```

Configuration
-------------

[](#configuration)

To use your own settings, publish config. `$ php artisan config:publish mrlian/smsservice`Find the config in `config/packages/mrlian/smsservice/config.php.`

Example Usage
-------------

[](#example-usage)

实例化一个短信平台. `$sms = SmsService::factory('YunPian');``$sms->sendSmsCode('yourPhoneNum', 'verificationCode');`可用方法：

1. `$sms->getCode();` 返回短信商信息代码0表示发送成功，其它代码自行查阅
2. `$sms->getMsg();` 返回短信商反馈信息

异常：（用于短信发送失败后切换平台）

```
$sms = SmsService::factory('LuosiMao');
$sms->sendSmsCode('yourPhoneNum', 'verificationCode');
try {
    $sms->getCode();
} catch (Mrlian\Smsservice\Vendor\SmsException $e) {
    $sms = SmsService::factory('YunPian');
}

```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/effe58424a19130310785f3d079fd78ad51c6ed0361a9a436a8cf01f07bb5c60?d=identicon)[mrlian](/maintainers/mrlian)

---

Top Contributors

[![larkin-keith](https://avatars.githubusercontent.com/u/8317104?v=4)](https://github.com/larkin-keith "larkin-keith (9 commits)")

### Embed Badge

![Health badge](/badges/mrlian-smsservice/health.svg)

```
[![Health](https://phpackages.com/badges/mrlian-smsservice/health.svg)](https://phpackages.com/packages/mrlian-smsservice)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

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