具有 except 方法的中间件身份验证不适用于参数
middleware auth with except method dont work for a parameter
我的问题是:
$this->middleware('auth', ['except'=>'getInfos', 'store']);
我的 getInfos except 工作正常,但存储方法不工作,我不明白为什么,你可以在我的路由列表(在终端中)下面的图片中看到。
picture of my code here
我到处找都没有找到,你看store和GetInfos有区别吗?
在此先感谢大家!
应该是一个多维数组:
$this->middleware('auth', ['except'=> ['getInfos', 'store']]);
或更好的视野:
$this->middleware('auth')->except('getInfos', 'store');
我的问题是:
$this->middleware('auth', ['except'=>'getInfos', 'store']);
我的 getInfos except 工作正常,但存储方法不工作,我不明白为什么,你可以在我的路由列表(在终端中)下面的图片中看到。
picture of my code here
我到处找都没有找到,你看store和GetInfos有区别吗?
在此先感谢大家!
应该是一个多维数组:
$this->middleware('auth', ['except'=> ['getInfos', 'store']]);
或更好的视野:
$this->middleware('auth')->except('getInfos', 'store');