Tucker-Eric/EloquentFilter

How to filter hasManyTrough relation

emanuellimabr opened this issue · 1 comments

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(); });

My mistake! ->first() should not be there.