Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
由于在 Laravel 5 中没有表单构建器类(你可以添加它,我知道),我如何在不使用任何表单构建器类的情况下发出 put、patch 和删除请求以匹配这些路由,只是普通的 Laravel?
您应该尝试添加:
<input name="_method" type="hidden" value="DELETE">
到你的表格。这就是表单生成器在 Laravel 4 中所做的——它只是添加了带有 name 的隐藏输入_method。
_method
当然,对于DELETE上述示例中的价值,您可以使用任何其他方法
DELETE