Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Laravel intersect

$collection = collect(['Desk', 'Sofa', 'Chair']);
 
$intersect = $collection->intersect(['Desk', 'Chair', 'Bookcase']);
 
$intersect->all();
 
// [0 => 'Desk', 2 => 'Chair']
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #Laravel #intersect
ADD COMMENT
Topic
Name
9+2 =