<?php

namespace Database\Seeders;

use App\Models\Subject;
use Illuminate\Database\Seeder;

class SubjectSeeder extends Seeder
{
    public function run(): void
    {
        $rows = [
            ['code'=>'AR','name'=>'Arabic'],
        ];
        foreach ($rows as $r) {
            Subject::updateOrCreate(['code'=>$r['code']], $r + ['is_active'=>true]);
        }
    }
}
