HanSon / lumen-wechat by hanson

The Lumen Framework for wechat.
14
12
1
Package Data
Maintainer Username: hanson
Package Create Date: 2016-07-23
Package Last Update: 2020-02-13
Language: PHP
License: MIT
Last Refreshed: 2024-12-15 15:14:53
Package Statistics
Total Downloads: 14
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 12
Total Watchers: 1
Total Forks: 1
Total Open Issues: 0

wechat

A wechat Application build on lumen

此项目基于lumen以及easywechat开发的微信项目

*注意:如使用laravel,可使用 wechat-handler

Installation

composer create-project hanson/wechat wechat dev-master

Configure

配置env,填写好需要的wechat信息即可

cp .env.example .env

Migration

暂时提供两个表,wechat_user以及message,执行migrate即可生成数据表

php artisan migrate

Handler

所有消息事件都位于app/Handlers中,事件Handler位于app/Handlers/EventHandlers

Service

所有的服务事件,直接在继承BaseController 的 Controller中 调用 $this->service即可

#example:
class MyController extends BaseController{

    public function index(){
        $user = $this->user;
        echo $user->get('openid')->nickname;
    }
}