<?php

namespace Modules\Auth\database\seeders;

use Illuminate\Database\Seeder;

class UserSeedSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $user = new \App\Models\User;
        if (!$user->where(['email' => 'admin@apactech.io'])->count()) {
            $user->factory()->createOne([
                'name' => 'admin',
                'email' => 'admin@apactech.io',
                'password' => bcrypt('admin123')
            ]);
        }
        $user->factory(10)->create();
        dump($user->get()->toArray());
    }
}
