{{-- resources/views/test-reports/_form.blade.php --}} @php // 決定目前模式:表單重填舊值,或編輯時根據是否已有 attachment_path $inputType = old('input_type', isset($report) && ($report->attachment_path ?? false) ? 'file' : 'content'); @endphp