<?php

use Illuminate\Database\Seeder;

class RemarkSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $remark_details = \App\Models\RemarkDetail::all();
        foreach ($remark_details as $item) {
            $remark = \App\Models\Remark::find($item->remark_id);
            if(!empty($remark)) {
                $item->teacher_id = $remark->teacher_id;
                $item->save();
            }
        }
    }
}
