adrema/database/factories/UserFactory.php

31 lines
624 B
PHP
Raw Permalink Normal View History

2021-11-23 19:15:39 +01:00
<?php
namespace Database\Factories;
use App\User;
use Illuminate\Database\Eloquent\Factories\Factory;
2022-02-19 15:18:24 +01:00
use Illuminate\Support\Facades\Hash;
2021-11-23 19:15:39 +01:00
/**
* @extends Factory<User>
*/
class UserFactory extends Factory
{
protected $model = User::class;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition()
{
return [
2022-02-19 15:18:24 +01:00
'email' => $this->faker->safeEmail,
'password' => Hash::make('password'),
2024-07-31 22:41:02 +02:00
'firstname' => $this->faker->firstName,
'lastname' => $this->faker->lastName,
2021-11-23 19:15:39 +01:00
];
}
}