@extends('layouts.app') @section('content')

Response: {{ $response->question->template->name ?? 'N/A' }}

{{ $response->lead->company_name }} - {{ $response->created_at->format('M d, Y H:i') }}

Back

Lead Information

Company Name

{{ $response->lead->company_name }}

Contact Person

{{ $response->lead->contact_person_name }}

Email

{{ $response->lead->email }}

Mobile

{{ $response->lead->mobile_number }}

Answers

@forelse($response->question->template->questions ?? [] as $index => $question)

{{ $index + 1 }}. {{ $question->question_text }}

@php $responses = json_decode($response->responses_data, true) ?? []; $answer = $responses[$question->id] ?? 'Not answered'; @endphp

{{ is_array($answer) ? implode(', ', $answer) : $answer }}

@empty

No questions in this template

@endforelse

Submitted On

{{ $response->created_at->format('M d, Y H:i:s') }}

Total Questions

{{ $response->question->template->questions->count() ?? 0 }}

Template Name

{{ $response->question->template->name ?? 'N/A' }}

@endsection