@extends('layouts.app') @php use Illuminate\Support\Str; $metaTitle = $category->meta_title ?: $category->name; $metaDesc = $category->meta_description ?: Str::limit(strip_tags($category->description ?? ''), 160); $metaKeys = $category->meta_keywords ?? null; // dacă ai coloană @endphp @section('title', $metaTitle) @section('meta_description', $metaDesc) @if($metaKeys) @section('meta_keywords', $metaKeys) @endif @section('canonical', route('category.show', $category->slug)) @push('styles') @endpush @section('content')
{{-- HERO --}}

{{ $category->name }}

{{-- Breadcrumb frumos --}} @if(!empty($breadcrumb))
Casa @foreach($breadcrumb as $i => $node) @if($i < count($breadcrumb) - 1) {{ $node->name }} @else {{ $node->name }} @endif @endforeach
@endif @if($category->meta_description)
{{ $category->meta_description }}
@endif
{{-- SIDEBAR --}} {{-- GRID PRODUSE --}}
@if($products->count()) {{-- Rezumat filtre active --}}
@forelse(($brandOptions ?? collect())->whereIn('id', $selectedBrandIds ?? []) as $b) {{ $b->name }} @empty @endforelse @if(request('min')!==null || request('max')!==null) Preț: {{ (int)($priceMin ?? $minBound) }}–{{ (int)($priceMax ?? $maxBound) }} @endif
Mostrato {{ $products->firstItem() }}–{{ $products->lastItem() }} da {{ $products->total() }} {{ $products->links('pagination::bootstrap-5') }}
@else
Non ci sono prodotti in questa categoria.
@endif
@endsection @push('scripts') @endpush