Answers for "laravel collection intersectKey"

PHP
0

laravel collection intersectKey

$collection = collect([
    'serial' => 'UX301', 'type' => 'screen', 'year' => 2009
]);

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

$intersect->all();

// ['type' => 'screen', 'year' => 2009]
Posted by: Guest on July-24-2021

Code answers related to "laravel collection intersectKey"

Browse Popular Code Answers by Language