{{-- HEADER --}}
{{-- FILTER --}}
{{-- FLASH --}}
@if (session('success'))
{{-- MOBILE CARD --}}
@forelse($videos as $index => $video)
@php
$no = ($videos instanceof \Illuminate\Pagination\AbstractPaginator)
? $videos->firstItem() + $index
: $index + 1;
@endphp
๐ฌ Lihat Video
@empty
{{-- PAGINATION --}}
@if($videos instanceof \Illuminate\Pagination\AbstractPaginator && request('per_page') !== 'all')
@php
$currentPage = $videos->currentPage();
$lastPage = $videos->lastPage();
$perPage = request('per_page', 5);
$search = request('search');
$from = $videos->firstItem() ?? 0;
$to = $videos->lastItem() ?? 0;
$total = $videos->total();
$window = 1;
$rangeStart = max(2, $currentPage - $window);
$rangeEnd = min($lastPage - 1, $currentPage + $window);
$pagesWithDots = [1];
if ($rangeStart > 2) $pagesWithDots[] = '...';
for ($i = $rangeStart; $i <= $rangeEnd; $i++) $pagesWithDots[] = $i;
if ($rangeEnd < $lastPage - 1) $pagesWithDots[] = '...';
if ($lastPage > 1) $pagesWithDots[] = $lastPage;
$buildUrl = function(int $page) use ($perPage, $search): string {
$params = ['page' => $page, 'per_page' => $perPage];
if ($search) $params['search'] = $search;
return url()->current() . '?' . http_build_query($params);
};
@endphp
@if($total > 0)
๐ฅ Video Company Profile
{{ session('success') }}
@endif
{{-- DESKTOP TABLE --}}
| # | Judul | Link Video | Status | Aksi | |
|---|---|---|---|---|---|
| {{ $no }} | {{ $video->title ?? '-' }} | ๐ฌ Lihat Video | {{ $video->is_active ? 'โ Aktif' : 'โ Nonaktif' }} |
{{-- Toggle --}}
โ๏ธ
|
|
|
๐ญ
Belum ada video company profile. |
|||||
๐ฅ
{{ $video->title ?? 'Tanpa Judul' }}
{{ $video->is_active ? 'Aktif' : 'Nonaktif' }}
{{-- Toggle --}}
โ๏ธ Edit
๐ญ
@endforelse
Belum ada video
Menampilkan {{ $from }}โ{{ $to }}
dari {{ $total }} video
@if($lastPage > 1)
@endif
@endif
@endif