Added logic in ocr create page

This commit is contained in:
dhanabalan
2025-10-27 18:26:40 +05:30
parent a126050963
commit b058bb3c8a
3 changed files with 21 additions and 7 deletions

View File

@@ -11,4 +11,14 @@ class CreateOcrValidation extends CreateRecord
protected static string $resource = OcrValidationResource::class;
public $photo1;
protected function mutateFormDataBeforeCreate(array $data): array
{
if (!empty($data['serial_numbers'])) {
$data['serial_numbers'] = json_decode($data['serial_numbers'], true);
}
return $data;
}
}