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

Ninjutsu's avatar

POST vs PATCH vs PUT

Hey guys, new here. I'm busy learning Laravel whilst developing an application. I'd like to just know about these new request methods. Coming from Vanilla PHP and Web Dev, I've only known GET & POST. What are the definitions of these and why when creating a controller with --resource does it auto-use PUT / PATCH for db update queries etc?

Many thanks!

0 likes
3 replies
aimflaiims's avatar

In POST method you can send body params in form-data

In PUT method you have to send body params in x-www-form-urlencoded

Header Content-Type:application/x-www-form-urlencoded

According to this, you cannot send files or multipart data in the PUT method

https://stackoverflow.com/a/52493763/6700273

Please or to participate in this conversation.