<?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\User;
use App\Models\Role;
use App\Models\Schedule;
use App\Models\Teacher;

class ScheduleTeacherRelSeeder extends Seeder
{
  /**
   * Run the database seeds.
   */
  public function run(): void
  {
    $schedule_1 = Schedule::find(1);
    $teacher_1 = Teacher::find(1);
    $schedule_2 = Schedule::find(2);
    $schedule_3 = Schedule::find(3);

    $teacher_1->schedules()->attach($schedule_1);
    $teacher_1->schedules()->attach($schedule_2);

    $schedule_3->teachers()->attach($teacher_1->id);
  }
}
