I have come across situations multiple times where I've wanted to create multiple models but provide different attributes to each one. This is also true for pivot records across multiple models.
...it would apply the attributes sequentially, looping back to the first until exhausted. So in this example, you'd get: 'Joe Bloggs', 'Jane Bloggs', 'Joe Bloggs', 'Jane Bloggs', 'Joe Bloggs'.
In a situation where there were more attributes than models to be created, it would simply ignore those additional attributes.
I have come across situations multiple times where I've wanted to create multiple models but provide different attributes to each one. This is also true for pivot records across multiple models.
It would be nice to have a syntax like:
This would apply to any method where attributes can be passed in:
In a situation where there were more models to be created than attributes provided...
...it would apply the attributes sequentially, looping back to the first until exhausted. So in this example, you'd get: 'Joe Bloggs', 'Jane Bloggs', 'Joe Bloggs', 'Jane Bloggs', 'Joe Bloggs'.
In a situation where there were more attributes than models to be created, it would simply ignore those additional attributes.