<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(Ignite\Core\Entities\User::class, function (Faker\Generator $faker) {
    static $password;

    $email = $faker->unique()->safeEmail;

    return [
        'email' => $email,
        'password' => $password ?: $password = bcrypt('secret'),
        "username" => $email,
        "first" => $faker->firstName,
        "last" => $faker->lastName,
        "password_salt" => "",
        "status" => 1,
        "internal" => 1,
        'remember_token' => str_random(10),
    ];
});
