如果在 Authenticate 中通过 Guard 重定向未登录用户?
如果在Authenticate中通过Guard重定向未登录用户?
如果是访问网页则重定向至登录页面。
如果是API则重定向至消息页面。
重写Authenticate中间件的authenticate
向redirectTo传递$guards参数即可在redirectTo判断$guards,从而改变重定向的路由。