2017-09-04 19:34:39 +01:00
|
|
|
<?php
|
|
|
|
|
2020-10-17 17:15:06 +01:00
|
|
|
namespace Database\Factories;
|
|
|
|
|
|
|
|
use App\Models\User;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
2019-03-23 15:41:01 +00:00
|
|
|
use Illuminate\Support\Str;
|
2017-09-04 19:34:39 +01:00
|
|
|
|
2023-02-18 09:34:57 +00:00
|
|
|
/**
|
|
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
|
|
|
*/
|
2020-10-17 17:15:06 +01:00
|
|
|
class UserFactory extends Factory
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* The name of the factory's corresponding model.
|
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
protected $model = User::class;
|
2019-03-23 15:41:01 +00:00
|
|
|
|
2020-10-17 17:15:06 +01:00
|
|
|
/**
|
|
|
|
* Define the model's default state.
|
|
|
|
*
|
2023-02-18 09:34:57 +00:00
|
|
|
* @return array<string, mixed>
|
2020-10-17 17:15:06 +01:00
|
|
|
*/
|
2023-02-18 09:34:57 +00:00
|
|
|
public function definition(): array
|
2020-10-17 17:15:06 +01:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
'name' => $this->faker->name,
|
|
|
|
'password' => bcrypt('password'),
|
|
|
|
'remember_token' => Str::random(10),
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|