<?php

use Illuminate\Database\Seeder;

class CompaniesTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        factory(App\Models\Company::class, 30)->create()->each(function ($company) {
            $company->addressBook()->save(factory(App\Models\AddressBook::class)->make());
        });
    }
}
