|
| 1 | +@if($paginator->count()) |
| 2 | + <div class="d-flex justify-content-between align-items-center"> |
| 3 | + <div class="text-muted"> |
| 4 | + {{ trans_choice(__('Showing :count from total :total entry|Showing :count from total :total entries', |
| 5 | + ['count' => $paginator->count(), |
| 6 | + 'total' => $paginator->total()] |
| 7 | + ), $paginator->total()) }} |
| 8 | + </div> |
| 9 | + </div> |
| 10 | +@endif |
| 11 | + |
| 12 | +@if ($paginator->hasPages()) |
| 13 | + <nav> |
| 14 | + <ul class="pagination"> |
| 15 | + {{-- Previous Page Link --}} |
| 16 | + @if ($paginator->onFirstPage()) |
| 17 | + <li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.previous')"> |
| 18 | + <span class="page-link" aria-hidden="true">‹</span> |
| 19 | + </li> |
| 20 | + @else |
| 21 | + <li class="page-item"> |
| 22 | + <a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev" aria-label="@lang('pagination.previous')">‹</a> |
| 23 | + </li> |
| 24 | + @endif |
| 25 | + |
| 26 | + {{-- Pagination Elements --}} |
| 27 | + @foreach ($elements as $element) |
| 28 | + {{-- "Three Dots" Separator --}} |
| 29 | + @if (is_string($element)) |
| 30 | + <li class="page-item disabled" aria-disabled="true"><span class="page-link">{{ $element }}</span></li> |
| 31 | + @endif |
| 32 | + |
| 33 | + {{-- Array Of Links --}} |
| 34 | + @if (is_array($element)) |
| 35 | + @foreach ($element as $page => $url) |
| 36 | + @if ($page == $paginator->currentPage()) |
| 37 | + <li class="page-item active" aria-current="page"><span class="page-link">{{ $page }}</span></li> |
| 38 | + @else |
| 39 | + <li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li> |
| 40 | + @endif |
| 41 | + @endforeach |
| 42 | + @endif |
| 43 | + @endforeach |
| 44 | + |
| 45 | + {{-- Next Page Link --}} |
| 46 | + @if ($paginator->hasMorePages()) |
| 47 | + <li class="page-item"> |
| 48 | + <a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next" aria-label="@lang('pagination.next')">›</a> |
| 49 | + </li> |
| 50 | + @else |
| 51 | + <li class="page-item disabled" aria-disabled="true" aria-label="@lang('pagination.next')"> |
| 52 | + <span class="page-link" aria-hidden="true">›</span> |
| 53 | + </li> |
| 54 | + @endif |
| 55 | + </ul> |
| 56 | + </nav> |
| 57 | +@endif |
0 commit comments