hanson / wechat
为wechat设计的Lumen框架。
dev-master
2020-02-13 10:41 UTC
Requires
- php: >=5.5.9
- laravel/lumen-framework: 5.2.*
- overtrue/wechat: ~3.1
- vlucas/phpdotenv: ~2.2
Requires (Dev)
- barryvdh/laravel-ide-helper: ^2.2
- fzaninotto/faker: ~1.4
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-09-14 18:58:31 UTC
README
基于lumen构建的微信应用程序
此项目已废弃,请移步:https://github.com/HanSon/laravel-admin-wechat
此项目基于lumen以及easywechat开发的微信项目
*注意:如使用laravel,可使用 wechat-handler
安装
composer create-project hanson/wechat wechat dev-master
配置
配置env文件,填写好需要的wechat信息即可
cp .env.example .env
迁移
暂时提供两个表,wechat_user以及message,执行migrate即可生成数据表
php artisan migrate
处理器
所有消息事件都位于app/Handlers
中,事件处理器位于app/Handlers/EventHandlers
中
服务
所有的服务事件,直接在继承BaseController的Controller中调用 $this->service即可
#example:
class MyController extends BaseController{
public function index(){
$user = $this->user;
echo $user->get('openid')->nickname;
}
}