37 lines
910 B
PHP
37 lines
910 B
PHP
<?php
|
|
|
|
namespace Database\Factories;
|
|
|
|
use App\Models\CredencialProfesional;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Facades\Hash;
|
|
|
|
/**
|
|
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\CredencialProfesional>
|
|
*/
|
|
class CredencialProfesionalFactory extends Factory
|
|
{
|
|
/**
|
|
* The name of the factory's corresponding model.
|
|
*
|
|
* @var string
|
|
*/
|
|
protected $model = CredencialProfesional::class;
|
|
|
|
/**
|
|
* Define the model's default state.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function definition(): array
|
|
{
|
|
return [
|
|
'usuario' => $this->faker->unique()->userName(),
|
|
'contra' => Hash::make('password'),
|
|
'rol' => $this->faker->randomElement(['Administrador', 'Profesional']),
|
|
'token' => null,
|
|
'fecha_hora' => null,
|
|
];
|
|
}
|
|
}
|