title: Laravel (5.6) how to seed tables with relationships to other tables
body: <p>Currently got some downtime and thought I’d play around with laravel as I usually just use it for basic web dev.</p>
  
  <p>I’ve tried seeders and like how it’s quicker for me to drop test data into a table but I’m not sure how I go about doing this for multiple tables which have relationships.</p>
  
  <p>In my case let’s say I’ve got 3 tables, a customer table, a customer address table and a customer purchase table.</p>
  
  <p>Seeding the customer table is easy because it’s the main table but the other two tables have a column called customer_id which is the reference back to the customer table.</p>
  
  <p>If I want to use seeders how do I write the code to make X amount of customers and then make the following records in the other tables which link back the created customers.</p>
  
  <p>Apologies if I’ve missed something in the documentation.</p>