[staticMenu mainmenu] code = "hauptmenu" == function onEnd() { $this['baseMenuTitle'] = config('app.name'); $this['activeMenuIndex'] = collect($this['menuItems'])->filter(fn ($entry) => ($entry->isChildActive || $entry->isActive) && count($entry->items))->keys()->first() ?? 'null'; $this['activeMenuTitle'] = collect($this['menuItems'])->filter(fn ($entry) => ($entry->isChildActive || $entry->isActive) && count($entry->items))->first()?->title ?: config('app.name'); } ==