$collection->limit($limit)

Returns a new collection with a limited number of elements

  • $limit (int)
    The number of elements to return
  • return ($collection)