PHPackages                             dscmall/ucenter - 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. dscmall/ucenter

ActiveLibrary

dscmall/ucenter
===============

ucenter client for laravel

v3.0.0(5y ago)45.1k↑50%1MITPHPPHP ^8.0

Since Apr 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/dscmall/ucenter)[ Packagist](https://packagist.org/packages/dscmall/ucenter)[ RSS](/packages/dscmall-ucenter/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (3)Versions (12)Used By (0)

Ucenter Client For Laravel5
---------------------------

[](#ucenter-client-for-laravel5)

### 安装

[](#安装)

- [Packagist](https://packagist.org/packages/dscmall/ucenter)
- [GitHub](https://github.com/dscmall/ucenter)

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

```
"dscmall/ucenter": "~1.0.0"

```

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

或运行

```
composer require dscmall/ucenter

```

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

```
'providers' => [

    'Binaryoung\Ucenter\UcenterServiceProvider'

]

```

找到 `aliases` 键，

```
'aliases' => [

    'Ucenter' => 'Binaryoung\Ucenter\Facades\Ucenter'

]

```

配置
--

[](#配置)

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

```
php artisan vendor:publish

```

ucenter配置项

```
//config.php
'url'		=> '', // 网站UCenter接受数据地址
'api'		=> 'http://localhost/ucenter', // UCenter 的 URL 地址, 在调用头像时依赖此常量
'connect'	=> 'mysql', // 连接 UCenter 的方式: mysql/NULL, 默认为空时为 fscoketopen()
'dbhost'	=> 'localhost', // UCenter 数据库主机
'dbuser'	=> 'root', // UCenter 数据库用户名
'dbpw'		=> 'root', // UCenter 数据库密码
'dbname'	=> 'ucenter', // UCenter 数据库名称
'dbcharset'	=> 'utf8',// UCenter 数据库字符集
'dbtablepre'=> '`uc`.uc_', // UCenter 数据库表前缀
'key'		=> '666cLXgFsrl6TcvDflhrvdcziY8SnhP1eexl1eQ', // 与 UCenter 的通信密钥, 要与 UCenter 保持一致
'charset'	=> 'utf-8', // UCenter 的字符集
'ip'		=> '127.0.0.1', // UCenter 的 IP, 当 UC_CONNECT 为非 mysql 方式时, 并且当前应用服务器解析域名有问题时, 请设置此值
'appid'		=> 1, //当前应用的 ID
'ppp'		=> 20, //当前应用的 ID

```

使用
--

[](#使用)

例如：获取用户名为test的信息

```
$result = Ucenter::uc_get_user('test');
var_dump($result);

```

更多函数请参考 [Ucenter 文档](http://faq.comsenz.com/library/UCenter/interface/interface_user.htm)

联系我
---

[](#联系我)

有问题，请提交issue

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 97.4% 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 ~145 days

Recently: every ~89 days

Total

11

Last Release

1859d ago

Major Versions

v1.0.4 → v2.0.02020-04-15

2.0.x-dev → v3.0.02021-04-07

PHP version history (5 changes)v1.0.0PHP &gt;=5.4.0

v2.0.0PHP &gt;=7.4

v2.0.1PHP ^7.4

v2.0.2PHP ^7.2

v3.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/14adbbf91a457fe02616d39410c9024975328c73ed344881a8d800ce5b5e1953?d=identicon)[ectouch](/maintainers/ectouch)

---

Top Contributors

[![binaryoung](https://avatars.githubusercontent.com/u/5364548?v=4)](https://github.com/binaryoung "binaryoung (38 commits)")[![ecmoban](https://avatars.githubusercontent.com/u/34014297?v=4)](https://github.com/ecmoban "ecmoban (1 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/dscmall-ucenter/health.svg)

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

PHPackages © 2026

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