30 lines
593 B
PHP
30 lines
593 B
PHP
|
<?php
|
||
|
|
||
|
namespace Database\Factories\Models;
|
||
|
|
||
|
use Workbench\App\Models\User;
|
||
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
||
|
use Illuminate\Support\Facades\Hash;
|
||
|
|
||
|
/**
|
||
|
* @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 [
|
||
|
'email' => $this->faker->safeEmail,
|
||
|
'password' => Hash::make('password'),
|
||
|
'name' => $this->faker->firstName,
|
||
|
];
|
||
|
}
|
||
|
}
|