This course will be retired on June 1, 2025.
Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
So why do we need to use Factories and Seeders? Imagine you wanted to add some test data for our API, but you don’t want to manually define all of the individual attributes for each model, which can be a tedious development task. Instead, we’re going to use model factories to generate large amounts of database records for each model instance using the powerful Faker library. Let’s get started!
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up