@props(['title', 'menu', 'icon'])
@php
$is = [];
foreach ($menu as $key => $value) {
$is[] = $key.'*';
}
@endphp
@foreach ($menu as $key => $item)
-
@php
// If the route key already contains a dot notation suffix (like .index, .mailer, etc.), use it as-is
// Otherwise, append .index to maintain backward compatibility
$routeName = (substr_count($key, '.') >= 1 && (str_ends_with($key, '.index') || str_ends_with($key, '.mailer')))
? $key
: $key . '.index';
@endphp
{{ $item }}
@endforeach