I try to do a query with 2 where clauses, but I get a bad response, not sure why.
$history = AnswerHistory::where('question_id', '=', $id)
->where(function ($query) {
$query->where('answer_type', '!=', "skipped");
})
->get();
For a specific $id in database I have 5 rows, 4 with answer_type = 'skipped, but the 5-one is NULL.
My response is null with this code, if I remove second where I get 5 items that includes "skipped" answers.
Wanted response is 1 row, where answer_type != 'skipped'.
PS. I also tried the answer from here.
