@php $currentCategory = request('category') ? \App\Models\Category::where('slug', request('category'))->first() : null; @endphp @extends('layouts.app') @section('title', $currentCategory ? $currentCategory->name : 'Semua Produk') @section('og_title', ($currentCategory ? $currentCategory->name : 'Semua Produk') . ' — ' . setting('brand_name', 'yClothes')) @section('og_description', 'Jelajahi koleksi ' . ($currentCategory ? strtolower($currentCategory->name) : 'produk') . ' terbaru kami.') @section('og_image', $currentCategory && $currentCategory->image_url ? $currentCategory->image_url : '') @section('content')

{{ $currentCategory ? $currentCategory->name : 'Semua Produk' }}

@if($currentCategory)
{{ $currentCategory->name }}
@endif
{{-- Sidebar Filter Desktop --}}
@include('products._filter', ['filterId' => 'desk'])
{{-- Grid Produk --}}
@if($products->count())
@foreach($products as $product)
@include('products._card', ['product' => $product])
@endforeach
{{ $products->withQueryString()->links() }}
@else

Belum ada produk ditemukan.

@endif
{{-- Offcanvas Filter Mobile --}}
Filter
@include('products._filter', ['filterId' => 'mob'])
@endsection