Search

Showing 7 of 1,216 result(s)

/blog/2018/04/11/laravel-5-retrieving-nested-array-values-with-pluck#content-global-arraypluck-helper-function

The array_pluck function is a shortcut to calling Arr::pluck . This function is declared in the global namespace.

/blog/2018/04/11/laravel-5-retrieving-random-elements-from-an-array-with-random#content-example-use

The random method is fairly straightforward, the following example simply setups an input array and invokes the random method on it to return random items from the array. If we supply a value of 1 as the argument for the $number , parameter, the...

/blog/2018/04/11/laravel-5-retrieving-random-elements-from-an-array-with-random#content-global-arrayrandom-helper-function

The array_random helper function is a shortcut to calling the Arr::random method. This function is defined in the global namespace.

/blog/2018/04/11/laravel-5-sorting-arrays-with-sort#content-example-use

Let's refactor our students example from the where section to use a class based structure. First, we will create a new StudentTestResult class: At this point we can build a new $testScores array: Now, the $testScores array will look like this: We...

/blog/2018/04/11/laravel-5-sorting-arrays-with-sort#content-global-arraysort-helper-function

The array_sort function is a shortcut to calling Arr::sort . This function is declared in the global namespace.