HelloCSE/database/factories/UsersFactory.php

26 lignes
582 o
PHP
Brut Vue normale Historique

2024-04-10 13:56:22 +02:00
<?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(),
];
}
}