Closed emanuellimabr closed 5 years ago
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.
->first()
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(); });