34 lines
1.0 KiB
PHP
34 lines
1.0 KiB
PHP
@if ($paginator->hasPages())
|
|
<div class="database-pagination">
|
|
|
|
@if ($paginator->onFirstPage())
|
|
<button class="btn" disabled>«</button>
|
|
@else
|
|
<button class="btn" wire:click="previousPage">«</button>
|
|
@endif
|
|
|
|
{{-- Pages --}}
|
|
@foreach ($elements as $element)
|
|
@if (is_string($element))
|
|
<button class="btn" disabled>{{ $element }}</button>
|
|
@endif
|
|
|
|
@if (is_array($element))
|
|
@foreach ($element as $page => $url)
|
|
<button
|
|
class="btn {{ $page == $paginator->currentPage() ? 'active' : '' }}"
|
|
wire:click="gotoPage({{ $page }})"
|
|
>{{ $page }}</button>
|
|
@endforeach
|
|
@endif
|
|
@endforeach
|
|
|
|
@if ($paginator->hasMorePages())
|
|
<button class="btn" wire:click="nextPage">»</button>
|
|
@else
|
|
<button class="btn" disabled>»</button>
|
|
@endif
|
|
|
|
</div>
|
|
@endif
|