The
Read more in the official Laravel docs.
mapInto() method iterates over the collection, creating a new instance of the given class by passing the value into the constructor.Read more in the official Laravel docs.