Master Data Generation with Laravel Seeders and Factories Our database has been created, so we’ll work on seeding our tables. I normally like to take care of the database architecture first before I move into the routes/controllers/models, but it’s all preference. If you’re doing TDD (test driven development), it won’t work quite like this. You’ll start with a route, then move to your controller, then your model/migration, etc. We’ll cover TDD later in the series, but for now, let’s look at seeding our tables. Laravel — P35: Database Setup (CMP) PersonalCarBrand Seeder Our PersonalCarBrand model contains a name and a slug. Whenever we’re seeding the

Efficient Testing in Laravel: The Role of Factories If you’re just starting out with Laravel, some of the first few questions that you’ll come across are: What is the difference between Seeders, Fakers, and Factories? Should I use them? Do I need to use all of them or can I use some of them? How do I create them? Laravel — P29: Models Intro Factories According to Laravel’s official documentation, “factories are classes that extend Laravel’s base factory class and define a model property and definition method.” Just think about it this way. If you’ve ever created a model, like