<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
use Carbon\Carbon;


class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
           // BORRAMOS DATA DE LA TABLA
         DB::table('users')->delete();
         DB::table('users')->truncate();       

         /* CARGA INCIAL DE DATOS  */
         DB::table('users')->insert([
          'name' => 'administrador',
          'email' => 'admin@gmail.com',
          'email_verified_at' => NULL,
          'password' => Hash::make('password'),
          'usua_nombreComercial' => 'Max Palli',
          'usua_foto' => 'DefaultUser.jpg',
          'rol_id' => '1',
          'created_at' => Carbon::now(),
          'updated_at' => Carbon::now()
      ]);

      DB::table('users')->insert([
        'name' => 'admin',
        'email' => 'abc@gmail.com',
        'email_verified_at' => NULL,
        'password' => Hash::make('password'),
        'usua_nombreComercial' => 'Ana King',
        'usua_foto' => 'DefaultUser.jpg',
        'rol_id' => '1',
        'created_at' => Carbon::now(),
        'updated_at' => Carbon::now()
    ]);
    
    }
}
