$collection->shuffle()

Shuffle all elements in the array

  • return ($collection)
    a new shuffled collection

Example

$collection->shuffle();