Support the ongoing development of Laravel.io →
Input Database Eloquent
Last updated 2 years ago.
0

You can define model factories in ModelFactory.php file and use the each() method to auto generate content based on the relationship set.

You can check detailed explanation here http://deepdivetuts.com/seeding-two-tables-using-laravel-5-3

I am using Faker library to add mass data.

Hope that helps

Last updated 7 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.