I'm trying to compare 2 collections, and put all values present in both into another collection.
So given these collections:
$text1 = collect('burger', 'cheese', 'bread', 'ham');
$text2 = collect('cheese', 'bread', 'tomato');
I would like to extract 'cheese' and 'bread'