$collection->slice($offset = null, $limit = null)
Returns a slice of the collection
-
$offset (int)
The optional index to start the slice from -
$limit (int)
The optional number of elements to return -
return ($collection)
Example
// get three elements starting with the fifth
$collection->slice(5, 3);