PHPackages                             rjielx/binewechat - 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. [API Development](/categories/api)
4. /
5. rjielx/binewechat

ActiveLibrary[API Development](/categories/api)

rjielx/binewechat
=================

WeChat official account.

02PHP

Since May 28Pushed 4y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

测试版
---

[](#测试版)

### 使用说明

[](#使用说明)

##### 安装

[](#安装)

```
composer require rjielx/binewechat

```

#### 在config/app.php中进行注册

[](#在configappphp中进行注册)

```
'providers' => [
    // 其它服务提供者
    \Bine\wechat\providers\WechatConfigProvider::class,
],

```

##### 注册

[](#注册)

```
php artisan vendor:publish --provider="Bine\wechat\providers\WechatConfigProvider"

```

> 在config/wechat.php配置公众号信息

#### 初始化

[](#初始化)

```
$config = config('wechat');
$wechat = new WechatServer($config);

```

#### 使用

[](#使用)

```
$wechat->getAccessToken();
......

```

> @method Token getAccessToken() 公众号AccessToken @method Token callbackIP() 获取微信callbackIP地址
>
> @method Webpage getCodeUri(array $params) 网页授权，用户同意获取code的路径 @method Webpage getCode(array $params) 网页授权，用户同意获取code @method Webpage getCodeToken(string $code) 网页授权，通过code换取网页授权access\_token @method Webpage refreshCodeToken(string $refresh\_token) 网页授权, 刷新CodeToken @method Webpage getOpenInfo(string $openId) 网页授权，获取用户微信信息
>
> @method JsapiJSSDK ticket() JS-SDK验证 @method JsapiJSSDK initWXJSInterface(string $url, array $jsApiList) 初始JS-SDK配置参数
>
> @method Menu setMenu(array $data,string $data\_type = 'array') 创建公众号菜单 @method Menu queryMenu() 查询公众号菜单信息 @method Menu deleteMenu() 删除公众号菜单
>
> @method TemplateMessage getIndustry() 获取设置的行业信息 @method TemplateMessage setIndustry(int $industry\_id1, int $industry\_id2) 设置所属行业 @method TemplateMessage getAllPrivateTemplate() 查询所有模板信息 @method TemplateMessage delPrivateTemplate(string $template\_id) 删除模板 @method TemplateMessage sendTemplateMessage(array $data) 发送模板消息
>
> @method Material getMaterialCount() 查询素材总数 @method Material getMaterialList(string $type = 'image') 查询永久素材列表 @method Material uploadImg(string $image) 上传图文消息内的图片获取URL @method Material addMaterial(string $img\_url,string $type = 'image') 新增其他类型永久素材 @method Material materialAddNews() 新增永久图文素材 @method Material getMaterial(string $media\_id) 获取永久素材 @method Material delMaterial(string $media\_id) 删除永久素材 @method Material materialUpdateNews(array $params) 修改永久图文素材
>
> @method MassMessage groupSending(string $content, array $people = \[\],string $type = 'news',string $is\_filter = 'filter') 群发消息 @method MassMessage massDelete(string $msg\_id,int $article\_idx = 0) 删除群发
>
> @method Tags tagsCreate(string $tag\_name) 创建标签 @method Tags getTags() 获取公众号已创建的标签 @method Tags tagsUpdate(int $tag\_id,string $tag\_name) 编辑标签 @method Tags tagsDelete(int $tag\_id) 删除标签 @method Tags getUserTags(int $tag\_id,string $next\_openid = '') 获取标签下粉丝列表

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 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/192bdc0ce8ca097115524224ce069918726f2ff209ac3e40326d3a36b33a07ca?d=identicon)[rjielx](/maintainers/rjielx)

---

Top Contributors

[![rjielx](https://avatars.githubusercontent.com/u/46103765?v=4)](https://github.com/rjielx "rjielx (20 commits)")

### Embed Badge

![Health badge](/badges/rjielx-binewechat/health.svg)

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M271](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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