@extends('layout') @push('styles') @endpush @section('content') @if (session('success'))
×

Success!

{{ session('success') }}

@endif @if (session('error'))
×

Error!

{{ session('error') }}

@endif

All Questions

Overview

{{-- Tabs / Filters (All | Open Ended | Yes/No | Multiple Choice) --}}
@php // Build base query string excluding 'page' so tabs reset to page 1 $baseQuery = request()->except(['page', 'type']); $currentType = request('type', 'all'); @endphp @foreach ($types as $type) @endforeach
{{-- Filters Row (search, sort, date) --}}
{{-- Keep type when changing other filters --}} {{-- Search --}} {{-- Sort --}} {{-- Direction --}} {{-- Date --}} {{-- Buttons (INLINE on Desktop, WRAP on Mobile) --}}
Reset
{{-- Table --}}
@forelse($questions as $question) @empty @endforelse
Question Type Options Count Created Date
icon

{{ Str::limit($question->question, 80) }} ID-{{ $question->id }}

{{ $question->type }} @if ($question->options_count) {{ $question->options_count }} @else @endif {{ optional($question->created_at)->format('M d, Y') }}
{{-- Action Trigger --}} {{-- Dropdown Menu --}}
icon Edit
@csrf @method('DELETE')

Are you sure?

This action cannot be undone.

No questions found.
{{-- Items per page dropdown --}}
@foreach (request()->except('per_page') as $key => $value) @endforeach
{{-- Pagination Display --}}

Page {{ $questions->currentPage() }} of {{ $questions->lastPage() }}

{{-- Previous --}} @if ($questions->onFirstPage()) @else icon @endif {{-- Next --}} @if ($questions->currentPage() == $questions->lastPage()) @else icon @endif
{{-- Optional small script: press Enter in search to submit --}} @endsection