@php // Define loop index for handling old input or database values $loopIndex = isset($loop->index) ? $loop->index : (isset($index) ? $index : 0); // Define variables for `product_file_name` field $fileNameFieldName = "product_file_name[$loopIndex]"; $fileNameValue = old("product_file_name.$loopIndex") ?? ($file->product_file_name ?? ''); // Define variables for `product_file` field $fileFieldName = "product_file[$loopIndex]"; @endphp
@error("product_file_name.$loopIndex") {{ $message }} @enderror
@error("product_file.$loopIndex") {{ $message }} @enderror
@if (isset($file->product_file_path)) View Current File @endif