@extends('layouts.admin.app') @section('title', __('pages/admin/question.title')) @section('content')
@php $types = config('question.types', []); $availableTypes = array_filter($types, fn($key) => $key !== 'default', ARRAY_FILTER_USE_KEY); @endphp
@if(($totalQuestions ?? 0) > 0) Preview @endif @if(empty($availableTypes)) {{ __('pages/admin/question.form.add_question') }} @else
{{ __('pages/admin/question.form.add_question') }}
@endif
{{-- Search --}}
{{-- Filter Dropdown --}}
{{ __('pages/admin/question.table.status') }} @foreach(\App\Models\Question::STATUSES as $status) @endforeach
{{ __('pages/admin/question.table.type') }} @foreach($availableTypes as $typeKey => $typeLabel) @endforeach
@include('pages.admin.question.partials.view-modal') @include('pages.admin.question.partials.form-modal')
@push('before-app-js') {!! JsValidator::formRequest('App\Http\Requests\Admin\QuestionRequest', '#questionForm') !!} @endpush @endsection @push('before-app-js') @vite(['resources/js/admin/question.js']) @endpush