Level 4
Solved: URL::route($request->route()[1]['as'])
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello! For logs, i want to get my path without parameters.
My requested endpoint:
http://my.app/v1/model/1
http://my.app/v1/model/2
http://my.app/v1/model/3
What i want for logs is all in this format: http://my.app/v1/model/{id}
How i can get this? All methods return the id on path.
Solved: URL::route($request->route()[1]['as'])
Please or to participate in this conversation.