{{-- resources/views/collection/show.blade.php --}} @extends('layouts.app') @php $perPage = 24; // same as PER_PAGE in the controller $pageUrl = $baseUrl . ($currentPage > 1 ? '?page=' . $currentPage : ''); $breadcrumbSchema = [ '@context' => 'https://schema.org', '@type' => 'BreadcrumbList', 'itemListElement' => [ ['@type' => 'ListItem', 'position' => 1, 'name' => 'Home', 'item' => url('/')], ['@type' => 'ListItem', 'position' => 2, 'name' => $collectionName, 'item' => $baseUrl], ], ]; $listItems = []; foreach ($products->values() as $i => $p) { $listItems[] = [ '@type' => 'ListItem', 'position' => ($currentPage - 1) * $perPage + $i + 1, 'url' => url('/retail/Productdetails/' . $p->id . '/' . $p->slug), 'name' => $p->name, ]; } $pageSchema = [ '@context' => 'https://schema.org', '@type' => 'CollectionPage', 'name' => $collectionName, 'url' => $pageUrl, 'inLanguage' => 'en-IN', 'isPartOf' => ['@type' => 'WebSite', 'name' => 'Bargain Book Hut', 'url' => url('/')], 'mainEntity' => [ '@type' => 'ItemList', 'numberOfItems' => (int) $totalCount, 'itemListElement' => $listItems, ], ]; @endphp @section('title', $collectionName . ' | Bargain Book Hut') @push('seo') @endpush @push('styles') @endpush @section('content') {{-- ══ HERO BANNER — separate desktop & mobile images ═════════ --}} @if(!empty($collectionImage)) {{-- DEBUG (delete after testing): view-source and look for this line --}}
{{ $collectionName }} @if(!empty($collectionImagemobile ?? null)) {{ $collectionName }} @endif
@endif {{-- TRUST STRIP --}}
Authentic Books
100% genuine copies,
sourced with care.
Wide Selection
Over 10,000 titles,
across genres & ages.
Best Prices
Unbeatable deals on
the books you love.
Fast & Reliable
Quick delivery. Carefully
packed. Every time.
{{-- MOBILE FILTER DRAWER --}}
Filters
{{-- SIDEBAR --}} {{-- MAIN --}}

{{ $collectionName }}

{{ number_format($totalCount) }} titles

@if($pills->isNotEmpty())
@foreach($pills as $pill) @endforeach
@endif
@include('collection.grid-items', ['products' => $products])
@push('scripts') @endpush @endsection