New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Add ability to seed Arr::shuffle() #23490

Merged
merged 2 commits into from Mar 12, 2018

Conversation

Projects
None yet
3 participants
@timacdonald
Contributor

timacdonald commented Mar 11, 2018

Ability to seed the array shuffle method. This is already available in Collection, but I've moved the functionality to Arr so it is accessible there also.

$seedShuffled = Arr::shuffle($array, date('H'))
@@ -541,11 +541,20 @@ public static function set(&$array, $key, $value)
* Shuffle the given array and return the result.
*
* @param array $array
* @param int $seed

This comment has been minimized.

@GrahamCampbell

@taylorotwell taylorotwell merged commit 91ee51f into laravel:5.6 Mar 12, 2018

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment