Skip to content

Commit 11a7cb0

Browse files
committed
Merge pull request #149 from thuey/master
Made it so the model array's key values will be included in the output.
2 parents fba5bde + 9ae45f1 commit 11a7cb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

starship/RestfullYii/widgets/ERestJSONOutputWidget.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ public function modelsToArray($model, $relations, $model_as_array = [])
144144
return $this->processAttributes($models, $relationName);
145145
}
146146
$list = [];
147-
foreach($models as $model) {
148-
$list[] = $this->processAttributes($model, $relationName);
147+
foreach($models as $index => $model) {
148+
$list[$index] = $this->processAttributes($model, $relationName);
149149
}
150150
return $list;
151151
};

0 commit comments

Comments
 (0)