Laravel's factory for() helper is great for setting up relationships.
But when two relationships point to the same model, conventions alone won't cut it.
In this video, I show how we can still use the nice fluent factory syntax to set up our test data.
And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.
Here to help,
Joel
P.S. Want to level up your Laravel testing skills? Check out our testing workshop.