<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Support\Str;
use Illuminate\Database\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        if(User::count() == 0)
        {
            \Artisan::call('passport:install');

            $user = User::create([
                "uuid"          => "",
                "username"      => "+22507070707",
                "password"      => bcrypt("123456"),
                "lastname"      => "Admin",
                "firstname"     => "Admin",
                "phone_code"    => "+225",
                "country_id"    => 1,
                "gender_id"     => 1
            ]);
            $user->createToken('AMCAuthApp');
            //$user->usersRoles()->insert([1,2,3]);
        }
    }
}
