Level 122
With this being a get request (I assume) you probably don't want a validation error thrown so just check the parameters and handle the exception how you need to
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I want to have a couple of query string params validated (so they are required).
For example, in my controller I could check:
request()->has(['filter.type', 'filter.id'])
I'm tempted to place this as a FormRequest but feels slightly off as it's not a form.
Where would you place code that validates the query string?
With this being a get request (I assume) you probably don't want a validation error thrown so just check the parameters and handle the exception how you need to
Please or to participate in this conversation.