<?php

namespace Database\Seeds;

use App\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $user = User::where('email', 'user1@gmail.com')->first();
        if (is_null($user)) {
            $user = new User();
            $user->name = "User 1";
            $user->username = "user1";
            $user->email = "user1@gmail.com";
            $user->password = Hash::make('12345678');
            $user->phone = "085112345678";
            $user->save();
        }
    }
}
