公式でも記載されていますが、分かりづらいのでメモ。 下記の例では、brand + type の組み合わせに対して最初のアイテムだけを含む新しいコレクションを作成します。 $collection = collect([ ['name' => 'iPhone 6', 'brand' => 'Apple', 'type' => 'phone'], ['name' => 'iPhone 5', 'brand' => 'Apple', 'type' => 'phone'], ['name' => 'Apple Watch', 'brand' => 'Apple', 'type' => 'watch'],…