I am saving multiple categories of single product in database using serialize. but now I need a search option on base of name and categories. Name works fine, but I was unable to figure out how can I use eloquent for category search.
Here is example:
Product 1 belong to A, B, C, D categories. In search user checked B, C. So I need to show product 1 under B and C selection (both are array).
For now, I use whereIn() but it only work if we have single id in database and array is coming from form. In my case I have array in db as well as in form. Any suggestion?