PHPackages                             e421083458/wxxcx - 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. e421083458/wxxcx

ActiveLibrary

e421083458/wxxcx
================

A WeChat applet plugins for Laravel.

1.1.0(8y ago)37988↓100%13[1 issues](https://github.com/e421083458/wxxcx/issues)[2 PRs](https://github.com/e421083458/wxxcx/pulls)MITPHPPHP &gt;=5.5.9

Since Feb 14Pushed 8y ago2 watchersCompare

[ Source](https://github.com/e421083458/wxxcx)[ Packagist](https://packagist.org/packages/e421083458/wxxcx)[ RSS](/packages/e421083458-wxxcx/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (3)Used By (0)

\[laravel-wxxcx\] package
=========================

[](#laravel-wxxcx-package)

Laravel 5 微信小程序插件

备注
--

[](#备注)

Api说明对应方法[wx.login](https://mp.weixin.qq.com/debug/wxadoc/dev/api/api-login.html)登录$obj-&gt;getLoginInfo[wx.getUserInfo](https://mp.weixin.qq.com/debug/wxadoc/dev/api/open.html#wxgetuserinfoobject)获取用户信息$obj-&gt;getUserInfo($encryptedData,$iv);reference：安装
--

[](#安装)

执行以下命令安装最新稳定版本:

```
composer require e421083458/wxxcx
```

或者添加如下信息到你的 `composer.json` 文件中 :

```
"e421083458/wxxcx": "1.*"
```

然后注册服务提供者到 Laravel中 :

```
E421083458\Wxxcx\WxxcxServiceProvider::class,
```

发布所需的资源(样式、视图、配置文件等):

```
php artisan vendor:publish --provider="E421083458\Wxxcx\WxxcxServiceProvider"
```

Demo
----

[](#demo)

共需要两步操作

1. 调用getLoginInfo得到用户信息,里面会自动封装sessionKey信息

```
$xcx = App::make("wxxcx");
$loginInfo = $xcx->getLoginInfo($code); //code为用户登陆成功后获取到的
print_r($loginInfo);
```

reponse:

```
{
    "openid": "oxkfq0NMYybphA3O6ZvN585ZuJCI",
    "session_key": "RKt9WSMWs8ijJ6TVj4OBbQ=="
}

```

2. 第一步操作成功后才能调用第二步, getUserInfo 会得到用户头像、昵称、等信息

```
$iv = "r7BXXKkLb8qrSNn05n0qiA==";
$encryptedData="CiyLU1Aw2KjvrjMdj8YKliAjtP4gsMZM
        QmRzooG2xrDcvSnxIMXFufNstNGTyaGS
        9uT5geRa0W4oTOb1WT7fJlAC+oNPdbB+
        3hVbJSRgv+4lGOETKUQz6OYStslQ142d
        NCuabNPGBzlooOmB231qMM85d2/fV6Ch
        evvXvQP8Hkue1poOFtnEtpyxVLW1zAo6
        /1Xx1COxFvrc2d7UL/lmHInNlxuacJXw
        u0fjpXfz/YqYzBIBzD6WUfTIF9GRHpOn
        /Hz7saL8xz+W//FRAUid1OksQaQx4CMs
        8LOddcQhULW4ucetDf96JcR3g0gfRK4P
        C7E/r7Z6xNrXd2UIeorGj5Ef7b1pJAYB
        6Y5anaHqZ9J6nKEBvB4DnNLIVWSgARns
        /8wR2SiRS7MNACwTyrGvt9ts8p12PKFd
        lqYTopNHR1Vf7XjfhQlVsAJdNiKdYmYV
        oKlaRv85IfVunYzO0IKXsyl7JCUjCpoG
        20f0a04COwfneQAGGwd5oa+T8yO5hzuy
        Db/XcxxmK01EpqOyuxINew==";
//为能演示demo,所以我需要手动设置一下sessionKey (ps:实际环境中调用getLoginInfo会自动获取到)
$xcx->setSessionKey("tiihtNczf5v6AKRyjwEUhQ==");
$userinfo = $xcx->getUserInfo($encryptedData,$iv);
print_r($userinfo);
```

reponse:

```
{
    "openId": "oGZUI0egBJY1zhBYw2KhdUfwVJJE",
    "nickName": "Band",
    "gender": 1,
    "language": "zh_CN",
    "city": "Guangzhou",
    "province": "Guangdong",
    "country": "CN",
    "avatarUrl": "http://wx.qlogo.cn/mmopen/vi_32/aSKcBBPpibyKNicHNTMM0qJVh8Kjgiak2AHWr8MHM4WgMEm7GFhsf8OYrySdbvAMvTsw3mo8ibKicsnfN5pRjl1p8HQ/0",
    "unionId": "ocMvos6NjeKLIBqg5Mr9QjxrP1FA",
    "watermark": {
        "timestamp": 1477314187,
        "appid": "wx4f4bc4dec97d474b"
    }
}

```

###  Health Score

33

—

LowBetter than 76% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

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

Every ~52 days

Total

2

Last Release

3273d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48d575e3cec682ccd281cab003679326effda58afd8c83a62319ca494b0943f6?d=identicon)[e421083458](/maintainers/e421083458)

---

Top Contributors

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

---

Tags

laravelwechatwxxcx

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/e421083458-wxxcx/health.svg)

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

###  Alternatives

[yansongda/laravel-pay

专注 Alipay/WeChat/Unipay 的 laravel 支付扩展包

1.1k347.5k6](/packages/yansongda-laravel-pay)[yansongda/laravel-notification-wechat

Laravel Wechat Notifications Driver

841.4k](/packages/yansongda-laravel-notification-wechat)[ibrand/wechat-backend

wechat backend for Laravel Application.

133.7k](/packages/ibrand-wechat-backend)

PHPackages © 2026

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