Short information about mapInto
The 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.
Repository: Gummibeer/gummibeer.de
(Github)
★ 9
Created: May 2020
Updated: May 2022
Laravel version: 8
Files in the example:
- app/Post.php