lizhen_gitee 5a2b1d27f5 被忽略的 10 months ago
..
src 5a2b1d27f5 被忽略的 10 months ago
tests 5a2b1d27f5 被忽略的 10 months ago
.gitignore 5a2b1d27f5 被忽略的 10 months ago
.php_cs 5a2b1d27f5 被忽略的 10 months ago
.travis.yml 5a2b1d27f5 被忽略的 10 months ago
LICENSE 5a2b1d27f5 被忽略的 10 months ago
README.md 5a2b1d27f5 被忽略的 10 months ago
composer.json 5a2b1d27f5 被忽略的 10 months ago
phpunit.xml 5a2b1d27f5 被忽略的 10 months ago

README.md

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 # 线上域名