issue solved in part validation for loadign image

This commit is contained in:
dhanabalan
2025-11-24 09:42:43 +05:30
parent 232befdf8f
commit dce5b1af45

View File

@@ -2301,11 +2301,20 @@ class QualityValidationResource extends Resource
$fileName = $expectedValue . ".png"; // or .jpg based on your file
$fullPath = storage_path("app/private/uploads/PartValidation/{$plantCodePart1}/{$fileName}");
// Generate URL through custom route
// // Generate URL through custom route
// $imageUrl = route('part.validation.image', [
// 'plant' => $plantCodePart1,
// 'filename' => $fileName
// ]);
if (file_exists($fullPath)) {
$imageUrl = route('part.validation.image', [
'plant' => $plantCodePart1,
'filename' => $fileName
]);
} else {
// URL for default placeholder image in public/images
$imageUrl = asset("images/not_found.png");
}
$set('part_validation1_error_image', $imageUrl);
return;