📜  laravel collection combine - PHP 代码示例

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

代码示例3
$collection = collect(['name', 'age']);

$combined = $collection->combine(['George', 29]);

$combined->all();

// ['name' => 'George', 'age' => 29]