I’m trying to add a ‘modelType’ property to each item in a collection. However, it doesnt seem to be showing up afterward:
$results->each(function($row, $index) use ($modelType) {
$row[‘modelType’] = $modelType;
});
debug($results->toArray()); //<---- modelType isn’t listed in any of my items