<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
use App\Models\User;

class SuperAdminSeeder extends Seeder
{
    public function run(): void
    {
        $email = env('ADMIN_EMAIL', 'admin@example.com');
        $password = env('ADMIN_PASSWORD', 'ChangeMe123!');
        User::updateOrCreate(['email'=>$email], [
            'name' => 'Super Admin',
            'password' => Hash::make($password),
            'role' => 'super_admin',
        ]);
    }
}

