If you are developing any API endpoint where you need to build an endpoint for updating record, the first choose in your mind will come to use either put or patch. However, using put or patch as a http verb and test it in postman is not that easy. Today, I will show you how to use Laravel PUT or PATCH in Postman.
Just imagine that, you have a route like this-
Now, once you want to try in postman by using put or patch, it already return an empty array of user’s request.
Now, to avoid this, you need to pass an extra body parameter that is
_method = put.
It will be like the following image.
Hope it will help you. TQ :).