@if($doubts->count() === 0)

No Questions Asked Yet!

Ask your first coding question using the box above — your teachers love helping you learn!

@else
@foreach($doubts as $doubt) @php $isPending = ($doubt['answer'] === 'Pending' || empty($doubt['answer'])); $staffName = $doubt['staff']['name'] ?? 'Teacher'; $dateText = \Carbon\Carbon::parse($doubt['updated_at'])->format('d M Y'); @endphp
#{{ $loop->iteration }}

{{ \Illuminate\Support\Str::limit($doubt['question'], 180) }}

{{ $staffName }} {{ $dateText }}
@if($isPending) Waiting for Teacher @else @endif
@endforeach
@endif