32 lines
773 B
PHP
32 lines
773 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
|
*/
|
|
class UserFactory extends Factory
|
|
{
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'username' => $this->faker->name,
|
|
'name' => $this->faker->name,
|
|
'enabled' => true,
|
|
'confirmed' => 1,
|
|
'province_fa' => $this->faker->name,
|
|
'city_fa' => $this->faker->name,
|
|
'password' => Hash::make('password1234'),
|
|
'avatar' => $this->faker->image
|
|
];
|
|
}
|
|
}
|