Skip to content

Filter loose and exact on same field using different GET parameters #546

Answered by dominikb
akulmehta asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @akulmehta,

you almost described the solution yourself. Translated into a QueryBuilder it can look like this:

QueryBuilder::for(Post::class)
    ->allowedFilters([
        AllowedFilter::partial('title'),
        AllowedFilter::exact('title_exact', 'title'),
    ])
    ->get();

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@akulmehta
Comment options

@akulmehta
Comment options

@dominikb
Comment options

Answer selected by akulmehta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants