📜  laravel 集合收集 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:06.981000             🧑  作者: Mango

代码示例2
$collection = collect([0, 1, 2, 3, 4, 5]);

$chunk = $collection->take(3);

$chunk->all();

// [0, 1, 2]