<?php

use Illuminate\Database\Seeder;
use App\Models\VehicleScores;
use App\Models\Judges;
use App\Models\Vehicles;

class VehicleScoresTableSeeder extends Seeder
{
    public function run()
    {
        $judges = Judges::all();
        $vehicles = Vehicles::all();

        foreach ($vehicles as $vehicle) {
            foreach ($judges as $judge) {
                factory(VehicleScores::class)->create([
                    'judge' => $judge->id,
                    'vehicle' => $vehicle->id,
                ]);
            }
        }
    }
}
