如果发布请求失败,我会尝试返回 400 的状态代码,然后将用户重定向回他们从中发送帖子的页面。我尝试了以下示例:return $response->withRedirect('/view/companies', 400);这只是返回一个白页return $response->withStatus(400);这只是返回一个白页return $response->withJson([], 400);这只是在顶部返回一个白页 return $response->withRedirect('/view/companies');这会将用户返回到页面,但不会通过 400 错误。
1 回答
- 1 回答
- 0 关注
- 99 浏览
添加回答
举报
0/150
提交
取消