Why send it at all? Just find it in the controller.
If it is important that the user can't see it, then don't put it client side.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a form that I would want to submit to a 'GET' endpoint that retrieves some information from an external API. The user should only see the 'title' field in the url but pass through a unique id to the route/controller that will use it to call the APi.
resource/item-title✅
While the route/controller receives the id, I haven't found a way to hide this parameter, since GET requests show all parameters in the URL.
IE -> resource/item-title/jfe893j3921j ❌
I have tried to create a ''POST' endpoint instead which does the job(via hidden input), but have ran into another issue since the post controller handler returns a view and every time the user refreshes they are prompted with another post re submission request. Ideally I would like to return this same page on refresh just without prompting a re submission.
Also direct 'GET' requests to the endpoint 'resource/item-title' should return a 404 since no 'id' has been passed. Is there way around this/best practices?
@electric18 happy to help. But without some sort of local lookup table (eg database), you are out of luck
Please or to participate in this conversation.