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

{{ $survey->title }}

Tarikh: {{ \Carbon\Carbon::parse($survey->date)->format('d M Y') }}
@if($survey->perincian)
{!! nl2br(e($survey->perincian)) !!}
@endif @if ($errors->any())
Ralat! {{ $errors->first() }}
@endif
@csrf
MAKLUMAT RESPONDEN
{{-- LOOP BAHAGIAN --}} @foreach($survey->sections as $section)
{{ $section->title }} @if($section->description)

{{ $section->description }}

@endif {{-- LOOP SOALAN --}} @foreach($section->questions as $question)
{{-- TYPE: RADIO --}} @if($question->type == 'radio')
@foreach($question->options as $option)
@endforeach {{-- OTHERS OPTION FOR RADIO --}} @if($question->allow_other_option)
@endif
{{-- TYPE: CHECKBOX --}} @elseif($question->type == 'checkbox')
@foreach($question->options as $option)
@endforeach {{-- OTHERS OPTION FOR CHECKBOX --}} @if($question->allow_other_option)
@endif
{{-- TYPE: TEXT --}} @elseif($question->type == 'text') @endif
@endforeach
@endforeach
@endsection @push('scripts') @endpush