src/Support/CollectionUtility.php
public static function collapseSerialized(EloquentCollection $collection)
	{
		return $collection->map(
			function (SerializedModel $menu_item) {
				return $menu_item->serialized();
			}
		)->collapse();
	}
public static function collapseSerialized(EloquentCollection $collection)
	{
		return $collection->map(
			function (SerializedModel $menu_item) {
				return $menu_item->serialized();
			}
		)->collapse();
	}
public static function collapseSerialized ( EloquentCollection $ collection ) { return $ collection -> map ( function ( SerializedModel $ menu_item ) { return $ menu_item -> serialized ( ) ; } ) -> collapse ( ) ; }
Collapse a keyed Eloquent Collection.

@param \Illuminate\Database\Eloquent\Collection $collection
@return \Illuminate\Support\Collection
Collapse a keyed Eloquent Collection .