Laravel - Collections - Method Collapse

The collapse method collapses a collection of arrays into a single, flat collection:

    
    $collection = collect([
        [1, 2, 3],
        [4, 5, 6],
        [7, 8, 9],
    ]);
    
    $collapsed = $collection->collapse();
    
    $collapsed->all();
    
    // [1, 2, 3, 4, 5, 6, 7, 8, 9]