Lae/database/factories/UserFactory.php

30 lines
541 B
PHP
Raw Normal View History

2022-08-12 07:56:56 +00:00
<?php
namespace Database\Factories;
2022-09-08 16:12:02 +00:00
use App\Models\User;
2022-08-12 07:56:56 +00:00
use Illuminate\Database\Eloquent\Factories\Factory;
class UserFactory extends Factory
{
/**
2022-09-08 16:12:02 +00:00
* The name of the factory's corresponding model.
2022-08-12 07:56:56 +00:00
*
2022-09-08 16:12:02 +00:00
* @var string
2022-08-12 07:56:56 +00:00
*/
2022-09-08 16:12:02 +00:00
protected $model = User::class;
2022-08-12 07:56:56 +00:00
/**
2022-09-08 16:12:02 +00:00
* Define the model's default state.
2022-08-12 07:56:56 +00:00
*
2022-09-08 16:12:02 +00:00
* @return array
2022-08-12 07:56:56 +00:00
*/
2022-09-08 16:12:02 +00:00
public function definition()
2022-08-12 07:56:56 +00:00
{
2022-09-08 16:12:02 +00:00
return [
'name' => $this->faker->name,
'email' => $this->faker->unique()->safeEmail,
];
2022-08-12 07:56:56 +00:00
}
}