Seeding With Factories in Laravel

Yesterday, we talked about how Factories can be used to generate test objects. Going a step further, any time you need to populate your database with test records, Seeders use factories to produces realistic values that match your expected schema. You wire your seeders into database/seeders/DatabaseSeeder.php, and from there a single php artisan db:seed gives […]