Here\'s an over-simplified example that doesn\'t work for me. How (using this method, I know there are better ways if I were actually wanting this specific result), can I get th
$regions = array(); Regions::chunk(10, function($users) use (&$regions ) { $stickers = array(); foreach ($users as $user) { $user->sababu = ($user->region_id > 1)? $user->region_id : 0 ; $regions[] = $user; } }); echo json_encode($regions);