Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

thepanda's avatar

Request data not loading

I'm testing my Laravel API using the Postman tool, but when I try to submit a form request using the PUT method, Laravel does not load the request data, failing my validation rule. I even tried the $request->all() but that also didn't work. This is only happening with form requests, JSON requests and query strings are working.

Screenshot of API response

0 likes
1 reply
thepanda's avatar
thepanda
OP
Best Answer
Level 5

Found it, when submitting form data to API requests we need to send it via POST request even if the route is defined using PUT or PATCH this is related to Symphony's internal request parsing so we need to spoof the request method by adding a _method field with the value set to the desired HTTP verb.

In short, I needed to change the request method to POST and add a _method field with value a value of PUT.

2 likes

Please or to participate in this conversation.