Where clauses for "FIND_IN_SET" function for convenience. #57267
Unanswered
leandrotijink
asked this question in
Ideas
Replies: 1 comment
-
This is an overly specific approach and usually a sign of bad database normalization. It would be counterproductive if Laravel encouraged such a database design |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I couldn't find a similar suggestion. My apologies if I missed it.
Lately I have been building a search results page with a filter on keywords given to a post (showing all posts with keyword X). Each post has a column with comma-separated values (keywords).
From what I can see, there is currently no convenient way to do this without writing using
whereRaw()
in combination withFIND_IN_SET(? , column_name)
.Would methods such as
whereListContains($column, $value)
andwhereListDoesntContain($column, $value)
be useful additions to the query builder?Beta Was this translation helpful? Give feedback.
All reactions