Laravel 9路线组有两个条件
在我的用户表中,我有一个字段(布尔值):
活动
目前使用我的路线
Route::middleware(['auth'])->group(function ()
,但我想做的就是添加活动,以便必须授权和活动。
我似乎找不到答案。
提前致谢!
In my users table I have a field (boolean):
active
My routes currently use
Route::middleware(['auth'])->group(function ()
but I want to do is to add the active so they will have to be authorised and active.
I can't seem to find the answer.
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将另一个中间件添加到组中。
您可以
像显然需要在应用程序/http/kernel.php中注册此中间件
一样实现该中间件
Add another middleware to group.
You can implement that middleware like
Obviously you need to register this middleware into app/Http/Kernel.php
I hope this help