  @php
    $authCheck = auth()->check();
    $permission= auth()->user();
@endphp
 <table class="table table-striped" id="poster_id">
                  <thead>
                    <tr>
                      <th>S.No.</th>
                      <th scope="col">Question</th>
                      <th scope="col">Action</th>
                    </tr>
                  </thead>
                  
                  <tbody>
                    @if (isset($questions) && !empty($questions))
                    @foreach ($questions as $key => $question)
                          
                            <tr>
                                {{-- <td>{{ $question->id }}</td> --}}
                                <!-- <td>{{ $key + 1 }}</td> -->
                                <td>{{ $questions->firstItem() + $key }}</td>
                                <td>{{ $question->question }}</td>
                               
                                  <td class="d-flex align-items-center">
                                    
                                    <!-- <button type="button" class="btn btn-sm  text-success me-2" onclick="editFunction({{ $question->id }})" data-bs-toggle="tooltip" data-bs-placement="top" title="Edit"><i class="fa-solid fa-pen-to-square"></i></button> -->

                                  <button type="button"
                                          class="btn btn-sm text-success me-2"
                                          onclick="editFunction('{{ $question->id }}')"
                                          data-bs-toggle="tooltip"
                                          data-bs-placement="top"
                                          title="Edit">
                                      <i class="fa-solid fa-pen-to-square"></i>
                                  </button>

                                    <a class="btn btn-sm text-danger me-2 delete-btn" data-id="{{ $question->id }}" data-bs-toggle="tooltip" data-bs-placement="top" title="Delete"><i class="fa-solid fa-trash"></i></a>
                                    
                                  </td>
                            
                            </tr>
                       
                      @endforeach
                    @endif
                  </tbody>
                </table>
                <div class="pagination-wrapper mb-4">
                        {{ $questions->links() }}
                    </div>