staudenmeir / eloquent-has-many-deep

Laravel Eloquent HasManyThrough relationships with unlimited levels
MIT License
2.67k stars 157 forks source link

doesnt work with -withCount()- #139

Closed perikobermio closed 3 years ago

perikobermio commented 3 years ago

Controller

$a = concursos::with(['withFases'])->withCount('users as users')->get();

Model

public function users() { return $this->hasManyDeep('App\Models_appgen\respuestas_usuarios', ['App\Models_appgen\fases','Ap\Models_appgen\preguntas','App\Models_appgen\respuestas'], ['id', 'id_fase','id_pregunta','id_respuesta']); }

withCount() => I get always 0 value with() => Iget always []

perikobermio commented 3 years ago

all fine. I should have checked the version before.