@php // Items store a plain path slug in `url` or `route` (not a registered // Laravel route name); url() passes absolute URLs (like the Newsletters // item's substack link) through unchanged, so this works for both. $menuItemHref = function ($item) { $path = $item->url ?: $item->route; return $path ? url(rtrim($path, '/') . '/') : '#'; }; $total = $items->count(); $half = (int) ceil($total / 2); $col1 = $items->slice(0, $half); $col2 = $items->slice($half); @endphp