@php $items = [ ['system-settings.users.index', '用户管理', 'people'], ['system-settings.sidebar.edit', '侧边栏管理', 'menu'], ['system-settings.databases.index', '数据库管理', 'storage'], ]; @endphp @foreach ($items as [$routeName, $label, $icon]) @php $active = request()->routeIs(Str::beforeLast($routeName, '.') . '.*'); @endphp $active, 'text-gray-600 hover:bg-purple-100 hover:text-purple-700' => ! $active, ]) @if ($active) aria-current="page" @endif > {{ $icon }} {{ $label }} @endforeach