|
| 1 | +@if ($paginator->hasPages()) |
| 2 | + <nav class="d-flex justify-items-center justify-content-between"> |
| 3 | + <div class="d-flex justify-content-between flex-fill d-sm-none"> |
| 4 | + <ul class="pagination"> |
| 5 | + {{-- Previous Page Link --}} |
| 6 | + @if ($paginator->onFirstPage()) |
| 7 | + <li class="page-item disabled" aria-disabled="true"> |
| 8 | + <span class="page-link">@lang('pagination.previous')</span> |
| 9 | + </li> |
| 10 | + @else |
| 11 | + <li class="page-item"> |
| 12 | + <a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">@lang('pagination.previous')</a> |
| 13 | + </li> |
| 14 | + @endif |
| 15 | + |
| 16 | + {{-- Next Page Link --}} |
| 17 | + @if ($paginator->hasMorePages()) |
| 18 | + <li class="page-item"> |
| 19 | + <a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">@lang('pagination.next')</a> |
| 20 | + </li> |
| 21 | + @else |
| 22 | + <li class="page-item disabled" aria-disabled="true"> |
| 23 | + <span class="page-link">@lang('pagination.next')</span> |
| 24 | + </li> |
| 25 | + @endif |
| 26 | + </ul> |
| 27 | + </div> |
| 28 | + |
| 29 | + <div class="d-none flex-sm-fill d-sm-flex align-items-sm-center justify-content-sm-between"> |
| 30 | + <div> |
| 31 | + <p class="small text-muted"> |
| 32 | + {!! __('Showing') !!} |
| 33 | + <span class="font-medium">{{ $paginator->firstItem() }}</span> |
| 34 | + {!! __('to') !!} |
| 35 | + <span class="font-medium">{{ $paginator->lastItem() }}</span> |
| 36 | + {!! __('of') !!} |
| 37 | + <span class="font-medium">{{ $paginator->total() }}</span> |
| 38 | + {!! __('results') !!} |
| 39 | + </p> |
| 40 | + </div> |
| 41 | + |
| 42 | + <div> |
| 43 | + <ul class="pagination"> |
| 44 | + {{-- Previous Page Link --}} |
| 45 | + @if ($paginator->onFirstPage()) |
| 46 | + <li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> |
| 47 | + <span class="page-link" aria-hidden="true">‹</span> |
| 48 | + </li> |
| 49 | + @else |
| 50 | + <li class="page-item"> |
| 51 | + <a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a> |
| 52 | + </li> |
| 53 | + @endif |
| 54 | + |
| 55 | + {{-- Pagination Elements --}} |
| 56 | + @foreach ($elements as $element) |
| 57 | + {{-- "Three Dots" Separator --}} |
| 58 | + @if (is_string($element)) |
| 59 | + <li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li> |
| 60 | + @endif |
| 61 | + |
| 62 | + {{-- Array Of Links --}} |
| 63 | + @if (is_array($element)) |
| 64 | + @foreach ($element as $page => $url) |
| 65 | + @if ($page == $paginator->currentPage()) |
| 66 | + <li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li> |
| 67 | + @else |
| 68 | + <li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li> |
| 69 | + @endif |
| 70 | + @endforeach |
| 71 | + @endif |
| 72 | + @endforeach |
| 73 | + |
| 74 | + {{-- Next Page Link --}} |
| 75 | + @if ($paginator->hasMorePages()) |
| 76 | + <li class="page-item"> |
| 77 | + <a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a> |
| 78 | + </li> |
| 79 | + @else |
| 80 | + <li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> |
| 81 | + <span class="page-link" aria-hidden="true">›</span> |
| 82 | + </li> |
| 83 | + @endif |
| 84 | + </ul> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | + </nav> |
| 88 | +@endif |
0 commit comments