Laravel 5 Collections: Getting the Last Collection Element With last
The last method is the logical opposite of the first method, and is used to get the last item in a collection, or to get the last item in a collection that matches a certain criteria. A $callback can be supplied to return the last item in the...