The pipe method passes the collection to the given closure and returns the result of the executed closure. Read more in the official Laravel docs.
pipe