$tag_collect = collect(); collect($params)->map(function ($item) use($tag_collect){ return collect($item['list'])->map(function($map) use($item,$tag_collect){ $tag_collect->push(['group'=>$item['group'], 'name' => $map['name']]); }); });