33 lines
735 B
PHP
Raw Permalink Normal View History

2024-09-03 14:38:34 -07:00
<?php
namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
2024-12-10 15:28:14 -08:00
'username' => $this->faker->userName(),
'password' => Hash::make('password'),
'remember_token' => Str::random(10),
2024-09-03 14:38:34 -07:00
];
}
}