public function shuffle($seed = null)
    {
        $items = $this->items;

        if (is_null($seed)) {
            shuffle($items);
        } else {
            srand($seed);

            usort($items, function () {
                return rand(-1, 1);
            });
        }

        return new static($items);
    }
public function shuffle($seed = null)
    {
        $items = $this->items;

        if (is_null($seed)) {
            shuffle($items);
        } else {
            srand($seed);

            usort($items, function () {
                return rand(-1, 1);
            });
        }

        return new static($items);
    }
public function shuffle ( $ seed = null ) { $ items = $ this -> items ; if ( is_null ( $ seed ) ) { shuffle ( $ items ) ; } else { srand ( $ seed ) ; usort ( $ items , function ( ) { return rand ( - 1 , 1 ) ; } ) ; } return new static ( $ items ) ; }
Shuffle the items in the collection.

@param  int $seed

@return static
Shuffle the items in the collection .