PHPackages                             goodspb/laravel5-ucpaas - 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. goodspb/laravel5-ucpaas

ActiveLibrary

goodspb/laravel5-ucpaas
=======================

Ucpaas SMS Client Provider For Laravel5

1111[2 issues](https://github.com/goodspb/laravel5-ucpaas/issues)PHP

Since Sep 23Pushed 10y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Ucpaas SMS Client Provider For Laravel5
---------------------------------------

[](#ucpaas-sms-client-provider-for-laravel5)

Ucpaas SMS Client Provider For Laravel5
云之讯开放平台 短信发送平台

### 安装

[](#安装)

- [Packagist](https://packagist.org/packages/goodspb/laravel5-ucpaas)
- [GitHub](https://github.com/goodspb/laravel5-ucpaas)

只要在你的 `composer.json` 文件require中加入下面内容，就能获得最新版.

```
"goodspb/laravel5-ucpaas": "~1.0"

```

然后需要运行 "composer update" 来更新你的项目

安装完后，在 `app/config/app.php` 文件中找到 `providers` 键，

```

    Goodspb\Laravel5Ucpaas\Laravel5UcpaasServiceProvider::class

```

找到 `aliases` 键，

```
'aliases' => array(

    'Ucpaas' => Goodspb\Laravel5Ucpaas\Facades\Ucpaas::class

)

```

配置
--

[](#配置)

运行以下命令发布配置文件

```
php artisan vendor:publish

```

然后到config目录下修改ucpaas.php

```
'appname'       =>  '我的应用名称',                             //应用名称
'appid'         =>  'xxx9d010a04a4baxxxxxxxxxxxxxxxxx',         //应用ID
'accountsid'    =>  'xxxa5fc150a72e5xxxxxxxxxxxxxxxxx',         //accountsid
'token'         =>  'xxx549fe7e962f3xxxxxxxxxxxxxxxxx',         //token
'codelen'       =>  5,                                          //短信验证码长度
//文字短信
'textTemplateId'        =>  '12037',                            //模板ID
'textTemplateContent'   =>  '{code}',                           //模板替换内容，使用{code}替换验证码，其他内容请自行使用 , 隔开

```

使用
--

[](#使用)

1、发送文字短信

```
if(!Ucpaas::checkPhone($cellphone)){
    //不是正常的手机号码
    throw new \Exception("手机号码不正确");
}

//生成验证码
$code = Ucpaas::CreateCode();

if(!Ucpaas::sendTextSms($cellphone,$code)){
    //发送失败
    throw new Exception($Ucpaas::getError());
}

```

2、发送语音短信

```
//验证手机和生成验证码

if(!Ucpaas::sendVioceSms($cellphone,$code)){
    //发送失败
    throw new Exception($Ucpaas::getError());
}

```

BUG
---

[](#bug)

有问题请 [issues](https://github.com/goodspb/laravel5-ucpaas/issues)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

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

---

Top Contributors

[![goodspb](https://avatars.githubusercontent.com/u/10245385?v=4)](https://github.com/goodspb "goodspb (2 commits)")

### Embed Badge

![Health badge](/badges/goodspb-laravel5-ucpaas/health.svg)

```
[![Health](https://phpackages.com/badges/goodspb-laravel5-ucpaas/health.svg)](https://phpackages.com/packages/goodspb-laravel5-ucpaas)
```

PHPackages © 2026

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