<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\ScheduleTeacherRel;
use Faker\Factory as Faker;

use App\Models\Exam;
use App\Models\Teacher;

class ExamTeacherRelSeeder extends Seeder
{
  public function run(): void
  {
    $teacher_1 = Teacher::find(1);
    $teacher_2 = Teacher::find(2);

    $exam_1 = Exam::find(1);
    $exam_2 = Exam::find(2);
    $exam_3 = Exam::find(3);
    $exam_4 = Exam::find(4);
    $exam_5 = Exam::find(5);

    $exam_1->teachers()->attach($teacher_1->id);

    $exam_2->teachers()->attach($teacher_2->id);

    $exam_3->teachers()->attach($teacher_1->id);
    $exam_4->teachers()->attach($teacher_1->id);
    $exam_5->teachers()->attach($teacher_1->id);
  }
}
