$items = Item::with(\'product\')->paginate(10);
$items = $items->map(function($product){
$product->name = \"Test\";
return $product;
You should save the data in a collection, work on them, inject them back, something like this:
$page = Input::get('page', 1);
$data = Item::with('product')->getByPage($page, 10);
$tempItems = $data->items;
$tempItems = $tempItems->map(function($product){
$product->name = "Test";
return $product;
});
$objects = Paginator::make($tempItems, $data->totalItems, 10);