{{-- HEADER --}}

Daftar Branding

{{-- FILTER --}}
@if(request('search')) @endif
{{-- FLASH --}} @if (session('success'))
{{ session('success') }}
@endif {{-- DESKTOP TABLE --}} {{-- MOBILE CARD --}}
@forelse($brandings as $item) @php $no = ($brandings instanceof \Illuminate\Pagination\AbstractPaginator) ? $brandings->firstItem() + $loop->index : $loop->iteration; @endphp
@if($item->image) @else
No Image
@endif

{{ $item->title }}

#{{ $no }}
@if($item->kategori) {{ $item->kategori->name }} @endif
@if($item->link_1) WhatsApp @endif @if($item->link_2) Instagram @endif @if($item->link_3) Website @endif
โœ๏ธ Edit
@csrf @method('DELETE')
@empty

Belum ada data branding.

@endforelse
{{-- PAGINATION --}} @if($brandings instanceof \Illuminate\Pagination\AbstractPaginator && request('per_page') !== 'all') @php $currentPage = $brandings->currentPage(); $lastPage = $brandings->lastPage(); $perPage = request('per_page', 5); $search = request('search'); $from = $brandings->firstItem() ?? 0; $to = $brandings->lastItem() ?? 0; $total = $brandings->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)
Menampilkan {{ $from }}โ€“{{ $to }} dari {{ $total }} branding @if($lastPage > 1) @endif
@endif @endif
0 branding dipilih
@csrf @method('DELETE')
โš ๏ธ

Hapus Branding?

Kamu yakin ingin menghapus 0 branding yang dipilih?
Tindakan ini tidak dapat dibatalkan.