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

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

wehnhew/ucenter
===============

Larave4 ucenter

v1.0.0(12y ago)121486[1 issues](https://github.com/wehnhew/laravel4-ucenter/issues)[1 PRs](https://github.com/wehnhew/laravel4-ucenter/pulls)MITPHPPHP &gt;=5.3.0

Since Nov 26Pushed 12y ago2 watchersCompare

[ Source](https://github.com/wehnhew/laravel4-ucenter)[ Packagist](https://packagist.org/packages/wehnhew/ucenter)[ Docs](https://github.com/wehnhew/laravel4-ucenter)[ RSS](/packages/wehnhew-ucenter/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

ucenter for Laravel 4
---------------------

[](#ucenter-for-laravel-4)

Laravel 4 ucenter.

[![Latest Stable Version](https://camo.githubusercontent.com/7fd806682b5c2a3d5495c75d3b65807191cd473af88312712bf73515a4aa5760/68747470733a2f2f706f7365722e707567782e6f72672f7765686e6865772f7563656e7465722f762f737461626c652e706e67)](https://packagist.org/packages/wehnhew/ucenter) [![Total Downloads](https://camo.githubusercontent.com/7b7cb853b5148579f2982a848a81ec9c2a9760e09f25daebe7d4444ad68af7f9/68747470733a2f2f706f7365722e707567782e6f72672f7765686e6865772f7563656e7465722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/wehnhew/ucenter)

### 安装

[](#安装)

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

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

```
"wehnhew/laravel4-ucenter": "dev-master"

```

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

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

```
'providers' => array(

    'Wehnhew\Ucenter\UcenterServiceProvider'

)

```

找到 `aliases` 键，

```
'aliases' => array(

    'Ucenter' => 'Wehnhew\Ucenter\Facades\Ucenter'

)

```

配置
--

[](#配置)

运行以下命令将配置复制到 `app\config\packages\wehnhew\ucenter` 方便修改配置

```
php artisan config:publish wehnhew/ucenter

```

ucenter配置项

```
//config.php
'url'		=> '/api/ucapi', // 网站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_', // UCenter 数据库表前缀
'key'		=> '6bc3bbKaoWnVrb26juVvk4uq4c2a5SNQvzv70Zs', // 与 UCenter 的通信密钥, 要与 UCenter 保持一致
'charset'	=> 'utf-8', // UCenter 的字符集
'ip'		=> '127.0.0.1', // UCenter 的 IP, 当 UC_CONNECT 为非 mysql 方式时, 并且当前应用服务器解析域名有问题时, 请设置此值
'appid'		=> 5, //当前应用的 ID
'ppp'		=> 20, //当前应用的 ID

```

使用
--

[](#使用)

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

```
$result = Ucenter::execute('uc_get_user',['wen']);
var_dump($result);

```

联系我
---

[](#联系我)

有问题，请发送到

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4644d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1829197?v=4)[wehnhew](/maintainers/wehnhew)[@wehnhew](https://github.com/wehnhew)

---

Top Contributors

[![wehnhew](https://avatars.githubusercontent.com/u/1829197?v=4)](https://github.com/wehnhew "wehnhew (8 commits)")

---

Tags

SSOlaravel4ucenter

### Embed Badge

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

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

###  Alternatives

[illuminate/auth

The Illuminate Auth package.

9328.5M1.3k](/packages/illuminate-auth)[workos/workos-php-laravel

WorkOS PHP Library for Laravel

382.1M](/packages/workos-workos-php-laravel)

PHPackages © 2026

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