Replies: 1 comment
-
Workaround can be found here: https://gist.github.com/Sarav-S/8cf262b78f934255172fcc8d779168ca#file-ordercontroller-php Keep in mind that you have to use |
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.
-
Hi !
I was trying to compare the value of a json column field with some value given by the user, but I couldn't make it right.
Given I have a Model MyModel which table contains a json field named settings
And the following models exist in database :
| id | settings |
| 1 | {setting1: "AwEsoMe"} |
| 2 | {setting1: "WoNdErFuL"} |
When I execute the following code:
Then Laravel converts the query to :
And the query returns no result
But I'd love to be able to lowercase the json part in order to make a case insensitive comparison :
So the query returns MyModel of id 1
I'm running MySQL 8.
Maybe it would be great if we could use the 'ILIKE' keyword, not supported by MySQL ?
What do you think about such a feature ?
Beta Was this translation helpful? Give feedback.
All reactions