easywechat-composer/easywechat-composer

The composer plugin for EasyWeChat

Installs: 1 869 479

Dependents: 38

Suggesters: 0

Security: 0

Stars: 87

Watchers: 1

Forks: 7

Open Issues: 0

Type:composer-plugin

1.4.1 2021-07-05 04:03 UTC

This package is auto-updated.

Last update: 2022-09-05 06:48:11 UTC


README

EasyWeChat Composer Plugin

Build Status Scrutinizer Code Quality Latest Stable Version Total Downloads License

Usage

Set the type to be easywechat-extension in your package composer.json file:

{
    "name": "your/package",
    "type": "easywechat-extension"
}

Specify server observer classes in the extra section:

{
    "name": "your/package",
    "type": "easywechat-extension",
    "extra": {
        "observers": [
            "Acme\\Observers\\Handler"
        ]
    }
}

Examples

Server Delegation

目前仅支持 Laravel

  1. config/app.php 中添加 EasyWeChatComposer\Laravel\ServiceProvider::class

  2. 本地项目.env 文件中添加如下配置:

EASYWECHAT_DELEGATION=true # false 则不启用
EASYWECHAT_DELEGATION_HOST=https://example.com # 线上域名