← All tasks
🧮
Programming Intermediate

Create a Model With a Related Factory

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the factory expression that creates one Post along with 3 related Comments in one call.

Scenario

A feature test needs a Post that already has comments attached.

Ready to try it?

Create a free account and try "Create a Model With a Related Factory" free for 7 days, no card required. Earn 90 XP and track your internship progress.

Already have an account? Sign in