How to filter hasManyTrough relation
emanuellimabr opened this issue · 1 comments
emanuellimabr commented
Is that possible to filter hasManyTrough relation? Every time I try I get the error "Column not found: 1054 Unknown column".
return $this->whereHas('informacoes', function($query) use ($sexo) { return $query->whereNomeAndValor('sexo', $sexo)->first(); });
emanuellimabr commented
My mistake! ->first()
should not be there.