{{-- Attendee feedback on a training session โ€” sections 1โ€“4 of the feedback form. Choices are required; an explanation box appears for answers that need one. From SessionFeedbackController@create: $session (trainer), $questions --}} @extends('layouts.app') @section('title', 'Session feedback') @section('content') @include('partials.flash') @php use App\Support\SessionFeedbackForm as Form; $inputCls = 'w-full px-3 py-2 bg-surface-container rounded-lg border-none focus:ring-2 focus:ring-primary/20 text-body-md outline-none'; $bySection = collect($questions)->groupBy('section', true); @endphp arrow_back Back to the session
rate_review

Feedback: {{ $session->title }}

{{ $session->session_date->format('l, j F Y') }} ยท {{ $session->trainerName() ?? 'Trainer' }}

lock Read by the training quality team only โ€” not shared with the trainer.

@if($errors->any())
Please answer the questions highlighted below.
@endif
@csrf @foreach(Form::sections() as $n => $sec) @continue(! $bySection->has($n))
{{ $n }}

{{ $sec['title'] }}

@foreach($bySection[$n] as $key => $q) @php $val = old("answers.$key"); $bad = $errors->has("answers.$key") || $errors->has("notes.$key"); @endphp

{{ $q['q'] }} @if($q['type'] === 'choice')*@else(optional)@endif

@if($q['type'] === 'choice')
@foreach($q['options'] as $ov => $ol) @endforeach
@error("answers.$key")

{{ $message }}

@enderror @if(! empty($q['explain']))
@error("notes.$key")

{{ $message }}

@enderror
@endif @else @endif
@endforeach
@endforeach
You can only send feedback once for each session.
@endsection