AlienCao

387 经验值

解决了,在app/Http/Middleware/VerifyCsrfToken.php

protected $except = [
        'wechat/*',
    ];

改成

protected $except = [
        'wechat',
    ];

就好了,貌似以前也有同学遇到同样的问题
https://laravist.com/discuss/534

app/Http/routes.php
就添加了一行

Route::any('/wechat', 'WechatController@serve');

Laravel+easyWechat,绑定微信公众号后台验证token成功,但发送文字,公众号提示该公众号暂时无法提供服务,查看log是这样的

[2016-08-11 12:31:26] local.ERROR: exception 'Illuminate\Session\TokenMismatchException' in /d/htdocs/laravel/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/VerifyCsrfToken.php:67

在VerifyCsrfToken.php里已加protected $except = [ 'wechat/*'];

迷茫中!!!!求教