I have one matching row in my query.
echo $result
gives 100
dd($result)
gives 1
var_dump($result)
gives int(1) int(0) int(0)
What's going on here?
Relevant code:
$results= DB::table('answers')->where('qid', $question->id)->where('answer', 'yes')->count();
Turns out I'm an idiot, it's within a foreach statement and iterating 3 times.