<?php
  
namespace Database\Seeders;
  
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use App\Models\User;
  
class CreateAdminUserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $user = User::create([
            'name' => 'Allen Yan(admin)', 
            'email' => 'admin@gmail.com',
            'phone' => '0900000000',
            'birthday' => now()->toDateString(),
            'password' => bcrypt('aa1234')
        ]);
        $user->assignRole('Admin');
        $user = User::create([
            'name' => 'Allen Yan(User)', 
            'email' => 'allen.yan@gmail.com',
            'phone' => '0900000001',
            'birthday' => now()->toDateString(),
            'password' => bcrypt('aa1234')
        ]);
        $user->assignRole('User');
    }
}
