Laravel Collection Public API: average
The average method in Laravel is an alias of the avg method. It calculates the average of items within a collection. In the provided example, both avg and average methods result in 12.5 when used on the given collection.