📜  采摘 laravel - PHP 代码示例

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

代码示例6
$collection = collect([
    'serial' => 'UX301', 'type' => 'screen', 'year' => 2009,
]);

$intersect = $collection->intersectByKeys([
    'reference' => 'UX404', 'type' => 'tab', 'year' => 2011,
]);

$intersect->all();

// ['type' => 'screen', 'year' => 2009]