-
I have a usecase in which I want to let the user be able to filter on a column/field either loose or exact. How can I write the Example: If the get request is: But if the request is: |
Beta Was this translation helpful? Give feedback.
Answered by
dominikb
Oct 16, 2020
Replies: 1 comment 3 replies
-
Hi @akulmehta, you almost described the solution yourself. Translated into a QueryBuilder::for(Post::class)
->allowedFilters([
AllowedFilter::partial('title'),
AllowedFilter::exact('title_exact', 'title'),
])
->get(); |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
akulmehta
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @akulmehta,
you almost described the solution yourself. Translated into a
QueryBuilder
it can look like this: