Search

Showing 7 of 1,216 result(s)

/blog/2018/04/22/laravel-5-collections-executing-a-function-on-collection-elements-and-values-with-mapspread

The mapSpread method is used to execute a callback on a collection. If the collection contains nested collections, or Traversable objects, the mapSpread will supply the elements of the nested collections as the arguments to the callback function....

/blog/2018/04/22/laravel-5-collections-executing-a-function-on-collection-elements-with-eachspread

The eachSpread method is used to execute the provided $callback function on each element in the collection. The element's values will become arguments to the callback function.The following example demonstrates the use of the eachSpread method:...

/blog/2018/04/22/laravel-5-collections-filtering-a-collection-based-on-key-presence-using-strict-comparison-operators-with-whereinstrict

The whereInStrict method is similar to the whereIn method; the difference is that the whereInStrict method will always use strict comparisons where determining the final collection results. The whereInStrict method does not modify the original...

/blog/2018/04/22/laravel-5-collections-filtering-a-collection-based-on-key-presence-using-strict-comparison-operators-with-wherenotinstrict

The whereNotInStrict method will return all of the items in a collection that do not have matching values (supplied via the $values parameter) for the provided $key . This method is capable of filtering collections of both arrays and objects. The...

/blog/2018/04/22/laravel-5-collections-filtering-a-collection-based-on-key-presence-with-wherein

The whereIn method is used to filter the collection based on a given $key and an array of the possible $values that the $key can have. The method also defines an optional $strict parameter, which when an argument with a truth value of true is...

/blog/2018/04/22/laravel-5-collections-filtering-a-collection-based-on-key-presence-with-wherenotin

The whereNotIn method will return all of the items in a collection that do not have matching values (supplied via the $values parameter) for the provided $key . This method is capable of filtering collections of both arrays and objects. The...

/blog/2018/04/22/laravel-5-collections-filtering-collection-elements-using-strict-comparison-operators-with-wherestrict

The whereStrict method is similar to the where method, but it will always use strict comparisons when determining the results to return.The $sampleCollection collection instance will be used in the following examples: If you noticed, the first...