Add query builder method whereJsonContainsAny() #49979
Unanswered
devnicolas1
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, when you provide multiple keys to
whereJsonContains()
, Laravel expects that the database entry contains ALL of the keys inserted in the method.My suggestion is to add a method called
whereJsonContainsAny
, where if you passed multiple keys, it will search for entries that contain ANY of the keys inserted in the method.I'm currently doing this using the way suggested here, but it would be nice to have a feature native to Laravel that makes the code look better.
I'm up to help to implement the code. I would just like to know if maintainers and community like the idea before I actually start coding it :)
Beta Was this translation helpful? Give feedback.
All reactions