PHPackages                             colyii/laravel\_send\_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. colyii/laravel\_send\_sms

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

colyii/laravel\_send\_sms
=========================

sms for laravel

2562PHP

Since Mar 23Pushed 9y ago1 watchersCompare

[ Source](https://github.com/colyii/laravel_send_sms)[ Packagist](https://packagist.org/packages/colyii/laravel_send_sms)[ RSS](/packages/colyii-laravel-send-sms/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

ManaSms
=======

[](#manasms)

基于[PhpSms](https://github.com/toplan/phpsms)，使用全平台短信服务商。

安装
==

[](#安装)

```
composer require colyii/laravel_send_sms//正式版
composer require colyii/laravel_send_sms:dev-master//开发版
```

快速上手
====

[](#快速上手)

\###1. 配置

- 配置代理器所需参数

为你需要用到的短信服务商(即代理器)配置必要的参数。可以在`config\phpsms.php`中键为`agents`的数组中配置，也可以手动在程序中设置，示例如下：

```
//example:
Sms::agents([
    'Oasms' => [
        'corpAccount' => 'your corpAccount',
        'userAccount' => 'your userAccount',
        'pwd' => 'your api password',
        'url' => 'http://www.oa-sms.com/sendSms.action',
    ],
    'Chuanglan' => [
        'apiAccount' => 'your api key',
        'apiPassword' => 'your api password',
        'clUrl' => 'http://222.73.117.158/msg/HttpBatchSendSM',
    ]
]);
```

- 配置可用代理器

配置你的调度方案。可在`config\phpsms.php`中键为`scheme`的数组中配置。也可以手动在程序中设置，示例如下：

```
//example:
'scheme' => [
        'Oasms' => [
            '30',
            'agentClass' => 'Colyii\LaravelSms\OasmsAgent',
        ],
        'Chuanglan' => [
            '0 backup',
            'agentClass' => 'Colyii\LaravelSms\ChuanglanAgent',
        ],
        'YunPian' => '0 backup',
    ],
```

\###2. 在laravel中使用

如果你只想单纯的在laravel中使用phpsms的功能可以按如下步骤操作， 当然也为你准备了基于phpsms开发的[laravel-sms](https://github.com/toplan/laravel-sms)

- 在config/app.php中引入服务提供器

```
//服务提供器
'providers' => [
    ...
    Toplan\PhpSms\PhpSmsServiceProvider::class,
    Toplan\Sms\SmsManagerServiceProvider::class,
]

//别名
'aliases' => [
    ...
    'PhpSms' => Toplan\PhpSms\Facades\Sms::class,
    'SmsManager' => Toplan\Sms\Facades\SmsManager::class,
]
```

- 生成配置文件

```
php artisan vendor:publish
```

生成的配置文件为config/phpsms.php，然后在该文件中按提示配置。

- 使用

详见API，示例：

```
PhpSms::make()->to($to)->content($content)->send();
```

\###3. 详细使用见

- [laravel-sms](https://github.com/toplan/laravel-sms)
- [phpsms](https://github.com/toplan/phpsms)

License
=======

[](#license)

MIT

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/cfd656193c0c5f7965d0802b1f3181dc3d16fb144bc4816c8553f055f57f14bc?d=identicon)[colyii](/maintainers/colyii)

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-google-calendar

Manage events on a Google Calendar

1.4k1.7M21](/packages/spatie-laravel-google-calendar)[phalcon/ide-stubs

The most complete Phalcon Framework IDE stubs library which enables autocompletion in modern IDEs.

1643.2M128](/packages/phalcon-ide-stubs)[captainhook/plugin-composer

Composer-Plugin handling your git-hooks

202.1M196](/packages/captainhook-plugin-composer)[mastergalen/adsense-ads

Display Adsense ads easily in Laravel.

1211.2k](/packages/mastergalen-adsense-ads)

PHPackages © 2026

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