@if($news->count() > 0)
| No |
Judul |
Kategori |
Penulis |
Tanggal |
Status |
Views |
Aksi |
@foreach($news as $item)
| {{ ($news->currentPage() - 1) * $news->perPage() + $loop->iteration }} |
{{ Str::limit($item->title, 50) }}
{{ Str::limit($item->excerpt, 60) }}
|
{{ $item->category === 'announcement' ? 'Pengumuman' : 'Berita' }}
|
{{ $item->user->name }} |
{{ $item->published_at->format('d M Y') }} |
@if($item->published)
Dipublikasikan
@else
Draft
@endif
|
{{ $item->views }}
|
|
@endforeach
{{ $news->links('pagination.admin') }}
@else
@endif