It's always easier if you show us your migrations, your data and the expected result.
WhereIn clause to check a Model contains all array elements
I have two models RaterType and QuestionType and they have a many-to-many relationship. I have a select element with multiple attribute turned on to get RaterTypes those exactly have the question_type_ids selected with the select field.
Here is what I mean, one RaterType might have two or more QuestionType. So, when I select one QuestionType from the select element I wanted to get all RaterType with selected QuestionType and if I selected another one I wanted to get all RaterType with both selected QuestionTypes.
I tried using whereIn clause but am not getting what I was looking, wehere clause just only checks one value not an array. How am I going to achieve this?
Please or to participate in this conversation.