Press "Enter" to skip to content

Higher Order Messages in Laravel

Laravel Collection has recently supported the higher order messages. What this means, we can perform shortcuts on implementing methods that each objects has.

The collection methods that provide higher order messages are: average, avg, contains, each, every, filter, first, flatMap, map, partition, reject, sortBy, sortByDesc, and sum.

For example:

Everything is awesome.