Laravel - Collections - Method Nth
The nth
method creates a new collection consisting of every n-th element:
$collection = collect(['a', 'b', 'c', 'd', 'e', 'f']);
$collection->nth(4);
// ['a', 'e']
You may optionally pass a starting offset as the second argument:
$collection->nth(4, 1);
// ['b', 'f']