JUST LAUNCHED
@foreach ($just['registros_productos'] as $item)
@include('website.shared.products-v2')
@endforeach
@php use Illuminate\Support\Str; // Map brands by lowercase name (you were already using $brandsByName) $brandsByName = collect($brands)->keyBy(function ($brand) { return mb_strtolower($brand['nombre']); }); // Helper: 'hp' -> 'hp-77', 'lenovo' -> 'lenovo-123', etc. $brandSlug = function (string $key) use ($brandsByName) { if (!isset($brandsByName[$key])) { return null; // brand not found, avoid errors } $brand = $brandsByName[$key]; return Str::slug($brand['nombre'] . '-' . $brand['id']); }; @endphp {{-- --}} {{-- the last section --}}
@if ($bannerPos2) @if ($bannerPos2['tipo'] === 'URL') Posición 2 @elseif ($bannerPos2['tipo'] === 'Productos') Posición 2 @endif @else Placeholder 2 @endif
@if ($bannerPos3) @if ($bannerPos3['tipo'] === 'URL') Posición 2 @elseif ($bannerPos3['tipo'] === 'Productos') Posición 2 @endif @else Placeholder 3 @endif
@if ($bannerPos4) @if ($bannerPos4['tipo'] === 'URL') Posición 2 @elseif ($bannerPos4['tipo'] === 'Productos') Posición 2 @endif @else Placeholder 3 @endif
@if ($bannerPos5) @if ($bannerPos5['tipo'] === 'URL') Posición 2 @elseif ($bannerPos5['tipo'] === 'Productos') Posición 2 @endif @else Placeholder 3 @endif