Level 102
You can probably use a json column to store the array data and then use
Model->whereJsonContains('coiumn', 32);
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
If I have a column in a table that stores data as an array, how could I query that column to return all the rows that have an element in the array that matches a variable?
Please or to participate in this conversation.