*/ class EmployeeDocumentFactory extends Factory { protected $model = EmployeeDocument::class; /** * @return array */ public function definition(): array { $type = fake()->randomElement(DocumentType::cases()); return [ 'employee_id' => Employee::factory(), 'document_type' => $type, 'title' => $type->label().' - '.fake()->word(), 'file_path' => 'documents/'.fake()->uuid().'.pdf', 'uploaded_at' => fake()->dateTimeBetween('-1 year', 'now'), ]; } }