ページネーションの自前HTMLを排除

This commit is contained in:
shibafu 2019-02-16 23:26:09 +09:00
parent 9244b8424d
commit 32139cb9da
2 changed files with 2 additions and 34 deletions

View File

@ -16,22 +16,6 @@
</a>
@endforeach
</div>
<ul class="pagination mt-4 justify-content-center">
<li class="page-item {{ $informations->currentPage() === 1 ? 'disabled' : '' }}">
<a class="page-link" href="{{ $informations->previousPageUrl() }}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
@for ($i = 1; $i <= $informations->lastPage(); $i++)
<li class="page-item {{ $i === $informations->currentPage() ? 'active' : '' }}"><a href="{{ $informations->url($i) }}" class="page-link">{{ $i }}</a></li>
@endfor
<li class="page-item {{ $informations->currentPage() === $informations->lastPage() ? 'disabled' : '' }}">
<a class="page-link" href="{{ $informations->nextPageUrl() }}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
{{ $informations->links(null, ['className' => 'mt-4 justify-content-center']) }}
</div>
@endsection

View File

@ -58,23 +58,7 @@
</li>
@endforeach
</ul>
<ul class="pagination mt-4 justify-content-center">
<li class="page-item {{ $results->currentPage() === 1 ? 'disabled' : '' }}">
<a class="page-link" href="{{ $results->previousPageUrl() }}" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
<span class="sr-only">Previous</span>
</a>
</li>
@for ($i = 1; $i <= $results->lastPage(); $i++)
<li class="page-item {{ $i === $results->currentPage() ? 'active' : '' }}"><a href="{{ $results->url($i) }}" class="page-link">{{ $i }}</a></li>
@endfor
<li class="page-item {{ $results->currentPage() === $results->lastPage() ? 'disabled' : '' }}">
<a class="page-link" href="{{ $results->nextPageUrl() }}" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
<span class="sr-only">Next</span>
</a>
</li>
</ul>
{{ $results->links(null, ['className' => 'mt-4 justify-content-center']) }}
@endif
@endsection