Replies: 1 comment 5 replies
-
Would this fit your usecase? $query->where(new CaseInsensitiveLike('mycolumn', new Value('%searchterm%')); I guess the column should always be |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
There are a couple of parts to case insensitive search that could benefit an abstraction.
To start with - choosing either
like
orilike
as the comparison operator, depending on the database driver.My other pain point is to do with needing to use
whereRaw()
instead ofwhere
, since the column name needs manually wrapping in alower()
function. Ideally, I should be able to search case-insensitively without needing to use a raw query.Beta Was this translation helpful? Give feedback.
All reactions