25 lignes
582 o
PHP
25 lignes
582 o
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
|
|
class UsersFactory extends Factory
|
|
{
|
|
|
|
public function definition(){
|
|
$login=$this->faker->userName();
|
|
$email="$login@".$this->faker->domainName();
|
|
|
|
|
|
return [
|
|
'login' => $login,
|
|
'email' => $email,
|
|
'password' => $this->faker->password(),
|
|
'token' => '',
|
|
'isadmin' => $this->faker->numberBetween(0, 1),
|
|
'creation_date' => time(),
|
|
'modification_date' => time(),
|
|
];
|
|
}
|
|
}
|