Laravel form won't PATCH, only POST - nested RESTfull Controllers, MethodNotAllowedHttpException

前端 未结 4 1282
隐瞒了意图╮
隐瞒了意图╮ 2021-01-05 11:47

I am trying to allow users to edit their playlist. However, whenever I try to execute the PATCH request, I get the MethodNotAllowed

4条回答
  •  隐瞒了意图╮
    2021-01-05 12:25

    Since html forms support only GET and POST you need to add an extra hidden field to the form called _method in order to simulate a PATCH request

    
    

提交回复
热议问题