Navigation in groups with translated labels
Hi folks,
I am struggling a bit on rebuilding my old v2-Frontend in v3. Right now I am trying to recreate the old navigation-structure which had been build using a NavigationBuilder. Here is the old code:
Important note:
m__
is my custom translation-function.
I am trying to follow the docs at https://filamentphp.com/docs/3.x/panels/navigation#grouping-navigation-items-under-other-items and came up with this so far in the PanelServiceProvider:
Now I am trying to add the WarehousemanagementResource
and added this code to it:
But this always leaves me with an error Call to a member function keyBy() on null
. I need to recreate the structure in the attached screenshot and I am confused that NavigationGroups are identified by their labels? How does that work with translations?
Could someone please help me in this and tell me what's the best practice with the desired outcome please? π1 Reply
Okay - I was able to figure out that my error came from a mixup. The correct code for the WarehouseManagementResource should have been this:
Problem is - the Sub-Group does not show up on the navigation... I tried returning a static string
return 'Tools';
but nothing shows up...
push? π
@Patrick Boivin - Hey Pat, can you help me on this one please?