ldc-crm/resources/views/bo/modules/pagination/simple.blade.php
2025-09-08 15:06:00 +02:00

32 lines
2.2 KiB
PHP

{{-- GET ACTUAL PAGINATION --}}
@php $pagination = intval(Cache::get('pagination.' . str(request()->route()->getName())->slug())); @endphp
@if ($paginator->items())
<nav class="pagination-custom d-flex flex-column flex-md-row justify-content-between align-items-center">
@include('bo.modules.pagination.items-per-page')
@if ($paginator->hasPages())
<div class="d-flex justify-content-end align-items-center mt-2 mt-md-0">
<ul class="pagination m-0">
{{-- PREVIOUS PAGE --}}
<li class="page-item @if ($paginator->onFirstPage()) disabled @endif">
<a class="page-link d-flex align-items-center text-start h-100" data-bs-tooltip="tooltip"
title="{{ __('pagination.previous_page') }}" aria-label="{{ __('pagination.previous_page') }}"
@if (!$paginator->onFirstPage()) href="{{ request()->fullUrlWithQuery(['page' => $paginator->currentPage() - 1]) }}" @endif
rel="prev" @if ($paginator->onFirstPage()) aria-hidden="true" disabled @endif>
<i class="fa-solid fa-chevron-left fa-2xs mt-1"></i>
<span class="ms-2">{{ __('pagination.previous_page') }}</span>
</a>
</li>
{{-- NEXT PAGE --}}
<li class="page-item @if (!$paginator->hasMorePages()) disabled @endif">
<a class="page-link d-flex align-items-center text-end h-100" data-bs-tooltip="tooltip"
title="{{ __('pagination.next_page') }}" aria-label="{{ __('pagination.next_page') }}"
@if ($paginator->hasMorePages()) href="{{ request()->fullUrlWithQuery(['page' => $paginator->currentPage() + 1]) }}" @endif
rel="next" @if (!$paginator->hasMorePages()) aria-hidden="true" disabled @endif>
<span class="me-2">{{ __('pagination.next_page') }}</span>
<i class="fa-solid fa-chevron-right fa-2xs mt-1"></i>
</a>
</li>
</div>
@endif
</nav>
@endif