A wechat Application build on 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
中,事件Handler位于app/Handlers/EventHandlers
中
所有的服务事件,直接在继承BaseController 的 Controller中 调用 $this->service即可
#example:
class MyController extends BaseController{
public function index(){
$user = $this->user;
echo $user->get('openid')->nickname;
}
}