@php $items = collect($items ?? [])->values()->map(function ($item, $index) { return [ '@type' => 'ListItem', 'position' => $index + 1, 'name' => $item['name'], 'item' => $item['url'], ]; })->all(); $breadcrumb = [ '@context' => 'https://schema.org', '@type' => 'BreadcrumbList', 'itemListElement' => $items, ]; @endphp