2017 © Pedro Peláez
 

library wechat-handler

image

hanson/wechat-handler

  • Sunday, August 28, 2016
  • by hanson
  • Repository
  • 2 Watchers
  • 12 Stars
  • 50 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 10 Versions
  • 2 % Grown

The README.md

wechat-handler

A package to create some base handler for wechat events faster! 帮你更快地生成微信事件文件, (*1)

依赖

laravel 5+ (lumen 请看 wechat), (*2)

EasyWechat 3+, (*3)

安装

composer require hanson/wechat-handler

使用

config/app.php的provider尾部加上, (*4)


App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class, # 加上 Hanson\Wechat\Handler\WechatHandlerServiceProvider::class,

然后执行php artisan make:handler, (*5)

接下来会生成若干文件, (*6)

app\Handler目录,负责处理所有的微信事件, (*7)

app\Http\Controllers\Wechat为微信的controller, (*8)

config\wechat.php 微信的配置(自行选择是否使用), (*9)

文档

Handler

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

Service

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

#example:
class MyController extends BaseController{

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

The Versions

28/08 2016

dev-master

9999999-dev

  Sources   Download

The Requires

 

by Avatar hanson

11/08 2016

1.0.17

1.0.17.0

  Sources   Download

The Requires

 

by Avatar hanson

10/08 2016

1.0.16

1.0.16.0

  Sources   Download

The Requires

 

by Avatar hanson

10/08 2016

1.0.15

1.0.15.0

  Sources   Download

The Requires

 

by Avatar hanson

10/08 2016

1.0.14

1.0.14.0

  Sources   Download

The Requires

 

by Avatar hanson

06/08 2016

1.0.13

1.0.13.0

  Sources   Download

The Requires

 

by Avatar hanson

06/08 2016

1.0.12

1.0.12.0

  Sources   Download

The Requires

 

by Avatar hanson

06/08 2016

1.0.11

1.0.11.0

  Sources   Download

The Requires

 

by Avatar hanson

05/08 2016

1.0.1

1.0.1.0

  Sources   Download

The Requires

 

by Avatar hanson

05/08 2016

1.0

1.0.0.0

  Sources   Download

The Requires

 

by Avatar hanson