35 lines
1.1 KiB
PHP
35 lines
1.1 KiB
PHP
<?php /** @var \Illuminate\Pagination\LengthAwarePaginator $paginator */ ?>
|
|
@if ($paginator->hasPages())
|
|
<div class="database-pagination">
|
|
|
|
@if ($paginator->onFirstPage())
|
|
<button class="btn" disabled>«</button>
|
|
@else
|
|
<a class="btn" href="{{ $paginator->previousPageUrl() }}">«</a>
|
|
@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)
|
|
<a
|
|
class="btn {{ $page == $paginator->currentPage() ? 'active' : '' }}"
|
|
href="{{ $url }}"
|
|
>{{ $page }}</a>
|
|
@endforeach
|
|
@endif
|
|
@endforeach
|
|
|
|
@if ($paginator->hasMorePages())
|
|
<a class="btn" href="{{ $paginator->nextPageUrl() }}">»</a>
|
|
@else
|
|
<button class="btn" disabled>»</button>
|
|
@endif
|
|
|
|
</div>
|
|
@endif
|