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

Ligonsker's avatar

Can post route with parameter cause issues?

I've seen a piece of code that uses post with parameters in the route and I want to change it:

Route::post('/some_route/{param1}/{param2}/{param3}', ...

It does not seem normal to me, but can that also cause issues?

0 likes
3 replies
Ligonsker's avatar

@kokoshneta thanks! didn't see that (just thought that I pass parameters already to POST in the request not in URL so it didn't seem right to me)

kokoshneta's avatar

@Ligonsker Obviously, you only want to send the relevant information as query parameters, the parts that make sense to keep the URL meaningful within your URL structure. If you’re creating a post or comment, you don’t want to send the user ID, body text, etc. in the URL.

1 like

Please or to participate in this conversation.