Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanson/wechat-lumen
A wechat Application build on lumen
https://github.com/hanson/wechat-lumen
Last synced: 24 days ago
JSON representation
A wechat Application build on lumen
- Host: GitHub
- URL: https://github.com/hanson/wechat-lumen
- Owner: Hanson
- Created: 2016-07-23T07:36:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-13T10:41:12.000Z (over 4 years ago)
- Last Synced: 2024-03-14T21:28:16.192Z (8 months ago)
- Language: PHP
- Size: 22.5 KB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A wechat Application build on lumen`此项目已废弃,请移步:https://github.com/Hanson/laravel-admin-wechat`
此项目基于[lumen](https://lumen.laravel.com/)以及[easywechat](https://easywechat.org)开发的微信项目
*注意:如使用laravel,可使用 [wechat-handler](https://github.com/HanSon/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;
}
}