Added logic in ocr create page
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user