Closed AlfioSaitta closed 7 years ago
Ok, find a workaround with a dataProvider:
$provider = new ActiveDataProvider([
'query' => User::findOne($id)->children(),
'pagination' => [
'pageSize' => false,
],
]);
foreach ($provider->models as $row) {
$tmp = $this->reportForUser($row->id, $product);
}
If i call the parents function, i can see the right result
Call:
$net = ArrayHelper::toArray(User::findOne($this->id)->parents()->all());
Result:
But i don't have any results from Children call Call:
$net = ArrayHelper::toArray(User::findOne($this->id)->children()->all());