{{ __('Manage Articles') }}

{{ __('Create New') }}
@if(session('success')) @endif @if(session('error')) @endif
{{ $articles->firstItem() ?? 0 }}–{{ $articles->lastItem() ?? 0 }} of {{ $articles->total() }}
@if ($articles->onFirstPage()) « @else « @endif @if ($articles->hasMorePages()) » @else » @endif
{{ __('Clear') }}
@foreach($articles as $article) @endforeach
{{ __('Title') }} {{ __('Author') }} {{ __('Category') }} {{ __('Status') }} {{ __('Actions') }}

{{ $article->title }}

{{ $article->user->name }}

{{ $article->category->title }}

{{ __(ucwords(str_replace('_', ' ', $article->status))) }} {{ __('Edit') }}
@if ($articles->hasPages())

Showing {{ $articles->firstItem() }} to {{ $articles->lastItem() }} of {{ $articles->total() }} results

{{-- Previous --}} @if ($articles->onFirstPage()) Previous @else Previous @endif @php $current = $articles->currentPage(); $last = $articles->lastPage(); if ($last <= 7) { $start = 1; $end = $last; } else { if ($current <= 4) { $start = 1; $end = 5; } elseif ($current >= $last - 3) { $start = $last - 4; $end = $last; } else { $start = $current - 2; $end = $current + 2; } } @endphp {{-- First Page --}} @if($start > 1) 1 @if($start > 2) ... @endif @endif {{-- Middle Pages --}} @for($page = $start; $page <= $end; $page++) @if($page == $current) {{ $page }} @else {{ $page }} @endif @endfor {{-- Last Page --}} @if($end < $last) @if($end < $last - 1) ... @endif {{ $last }} @endif {{-- Next --}} @if ($articles->hasMorePages()) Next @else Next @endif
@endif