@extends('layouts.master') @section('css') @stop @section('content') @if(Session::has('message_error'))
| N° | Preguntas | @php // Get options from the first radio question to use as table headers $firstRadioQuestionOptions = $radioQuestions->first() ? (is_array($radioQuestions->first()->options) ? $radioQuestions->first()->options : json_decode($radioQuestions->first()->options ?? '[]', true)) : []; $firstRadioQuestionOptions = is_array($firstRadioQuestionOptions) ? $firstRadioQuestionOptions : []; @endphp @foreach ($firstRadioQuestionOptions as $option){{ $option }} | @endforeach
|---|---|---|
| {{ $radioCounter++ }} | {{ $question->question_text }} | @php $options = is_array($question->options) ? $question->options : json_decode($question->options ?? '[]', true); $options = is_array($options) ? $options : []; @endphp @foreach ($options as $optionValue)id) == $optionValue ? 'checked' : '' }} required> | @endforeach