阅读(1988) (10)

Laravel 8 Arr::collapse() {#collection-method}

2021-07-02 16:48:58 更新

Arr::collapse 函数将多个数组合并为一个数组:

use Illuminate\Support\Arr;

$array = Arr::collapse([[1, 2, 3], [4, 5, 6], [7, 8, 9]]);

// [1, 2, 3, 4, 5, 6, 7, 8, 9]