Laravel API, how to accept DELETE method

后端 未结 3 1327
温柔的废话
温柔的废话 2021-01-29 00:08

I need to use my API to delete some entities, I create my controller, my methods, the routes. They works fine, all the get and put/patch method works, but with the delete one I

3条回答
  •  一个人的身影
    2021-01-29 00:48

    When you are posting to the Delete url, make sure you have this data in your post request:

    _method=delete
    

    this is just like an input field e.g:

    
    

提交回复
热议问题