<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Models\User;
use Illuminate\Support\Facades\Hash;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->id();
            $table->string('first_name', 250);
            $table->string('last_name', 250);
            $table->string('email', 250)->unique();
            $table->string('phone', 250)->nullable();
            $table->string('photo', 250)->nullable();
            $table->string('password', 250);
            $table->timestamp('email_verified_at')->nullable();
            $table->rememberToken();
            $table->timestamps();
        });

        User::create(['first_name' => 'Andrija','last_name' => 'Kobasić','email' => 'andrija.kobasic@outlook.com','password' => Hash::make('InRo1986!'),'email_verified_at'=>'2023-01-02 17:04:58','created_at' => now(),]);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users');
    }
};
