PHPackages                             uilewis/laravel-wx-xcx - 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. uilewis/laravel-wx-xcx

ActiveLibrary

uilewis/laravel-wx-xcx
======================

腾讯小程序

011PHP

Since Jul 19Pushed 4y ago2 watchersCompare

[ Source](https://github.com/uilewis/laravel-wx-xcx)[ Packagist](https://packagist.org/packages/uilewis/laravel-wx-xcx)[ RSS](/packages/uilewis-laravel-wx-xcx/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

laravel-wx-xcx for Laravel 5
============================

[](#laravel-wx-xcx-for-laravel-5)

[](#)

laravel-wx-xcx

腾讯微信小程序composer包

###### \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

[](#-1)

laravel Installation
====================

[](#laravel-installation)

### Install via composer

[](#install-via-composer)

Run the following command to pull in the latest version:

###### composer命令安装扩展包

[](#composer命令安装扩展包)

```
composer require uilewis/laravel-wx-xcx
```

##### For laravel &gt;=5.5 that's all. This package supports Laravel new Package Discovery.

[](#for-laravel-55-thats-all-this-package-supports-laravel-new-package-discovery)

##### If you are using Laravel &lt; 5.5, you also need to add YueCode\\Cos\\QCloudCosServiceProvider::class to your `config/app.php` providers array:

[](#if-you-are-using-laravel--55-you-also-need-to-add-yuecodecosqcloudcosserviceproviderclass-to-your-configappphp-providers-array)

###### 如果laravel版本小于5.5 需要添加YueCode\\Cos\\QCloudCosServiceProvider::class到 `config/app.php` 文件中如下：

[](#如果laravel版本小于55-需要添加yuecodecosqcloudcosserviceproviderclass到-configappphp-文件中如下)

```
'providers' => [

        /*
         * Application Service Providers...
         */
         ......
        Uilewis\WxXcx\WxXcxServiceProvider::class,
    ],
```

### To publish the config settings in Laravel 5 use:

[](#to-publish-the-config-settings-in-laravel-5-use)

###### 执行命令复制COS配置文件到config目录

[](#执行命令复制cos配置文件到config目录)

```
php artisan vendor:publish --provider=" Uilewis\WxXcx\WxXcxServiceProvider"
```

### Configure config

[](#configure-config)

###### 配置config/cos.php

[](#配置configcosphp)

```
config/xcx_wx.php
```

Usage
=====

[](#usage)

###### 使用

[](#使用)

```
......

    // 微信小程序
    $xcx = app('xcx');

    /**
     * 通过code获取用户信息
     * @param $code  小程序code
     * @return array  用户信息
     */
     $user_info_arr = $xcx->getLoginInfo($code);

```

###### \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

Lumen Installation
==================

[](#lumen-installation)

### Install via composer

[](#install-via-composer-1)

Run the following command to pull in the latest version:

```
composer require uilewis/laravel-wx-xcx
```

Bootstrap file changes. Add the following snippet to the bootstrap/app.php file under the providers section as follows:

###### 添加以下代码到`bootstrap/app` 文件中 Register Service Providers 部分

[](#添加以下代码到bootstrapapp-文件中-register-service-providers-部分)

```
$app->register(UiLewis\WxXcx\WxXcxServiceProvider::class);
```

### Configure config

[](#configure-config-1)

###### 配置config/cos.php

[](#配置configcosphp-1)

```
config/xcx_wx.php
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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/a2c842d8d24461c4a8900f4d1bfe3055eb6694fa2405e9ee5d688ffa6e5c6d57?d=identicon)[uilewis](/maintainers/uilewis)

---

Top Contributors

[![lewis755](https://avatars.githubusercontent.com/u/65954127?v=4)](https://github.com/lewis755 "lewis755 (4 commits)")[![uilewis](https://avatars.githubusercontent.com/u/65955776?v=4)](https://github.com/uilewis "uilewis (1 commits)")

### Embed Badge

![Health badge](/badges/uilewis-laravel-wx-xcx/health.svg)

```
[![Health](https://phpackages.com/badges/uilewis-laravel-wx-xcx/health.svg)](https://phpackages.com/packages/uilewis-laravel-wx-xcx)
```

PHPackages © 2026

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