时间:2021-07-01 10:21:17 帮助过:8人阅读
Route::group(['middleware' => ['auth:account']], function () {
Route::controller('account/wechat', 'Account\WechatController');
});
Route::controller('wechat/website', 'Wechat\WebsiteController');
已经登录进account/wechat
了,在WechatController里能用Auth::user()
获取到用户详情
但是在WebsiteController却获取不到,怎么解决 ?
Route::group(['middleware' => ['auth:account']], function () {
Route::controller('account/wechat', 'Account\WechatController');
});
Route::controller('wechat/website', 'Wechat\WebsiteController');
已经登录进account/wechat
了,在WechatController里能用Auth::user()
获取到用户详情
但是在WebsiteController却获取不到,怎么解决 ?
不知道你的middleware
是具体怎么实现的,大概可以尝试:
Route::group(['middleware' => ['auth:account']], function () {
Route::controller('account/wechat', 'Account\WechatController');
Route::controller('wechat/website', 'Wechat\WebsiteController');
});