Laravel 5 Collections: Calculating the Sum of a Collection With sum
The sum is a simple method that returns the sum of all items in a collection. It also defines a $callback parameter which can be used to tell the sum method which values of the collection should be added together. If no items are in the...