Created
July 20, 2023 22:32
-
-
Save webber12/4dc88a08e32f500b58038affa16bd18e to your computer and use it in GitHub Desktop.
paginator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="col-sm-12 col-md-5"> | |
<div class="dataTables_info">Показано {{ $paginator->firstItem() }} - {{ $paginator->lastItem() }} из {{ $paginator->total() }}</div> | |
</div> | |
<div class="col-sm-12 col-md-7"> | |
@if($paginator->hasPages()) | |
<div class="dataTables_paginate paging_simple_numbers" > | |
<ul class="pagination"> | |
@if(!$paginator->onFirstPage()) | |
<li class="paginate_button page-item previous"> | |
<a href="{{ Str::replace([ '&page=1', 'page=1' ], '', $paginator->previousPageUrl()) }}" class="page-link">Назад</a> | |
</li> | |
@else | |
<li class="paginate_button page-item previous disabled"> | |
<a href="#" class="page-link">Назад</a> | |
</li> | |
@endif | |
@for($page = 1; $page <= $paginator->lastPage(); $page++) | |
<li class="paginate_button page-item @if($paginator->currentPage() == $page) active @endif "> | |
<a href="{{ Str::replace([ '&page=1', 'page=1' ], '', $paginator->url($page)) }}" class="page-link">{{ $page }}</a> | |
</li> | |
@endfor | |
@if($paginator->hasMorePages()) | |
<li class="paginate_button page-item next "> | |
<a href="{{ $paginator->nextPageUrl() }}" class="page-link">Далее</a> | |
</li> | |
@else | |
<li class="paginate_button page-item next disabled"> | |
<a href="#" class="page-link">Далее</a> | |
</li> | |
@endif | |
</ul> | |
</div> | |
@endif | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment