Combining resources
I am looking for a way to combine related resources. For example I have a User Resource, an Invite Resource, and a Role Resource. Since Invites and Role Management is related to User Management I want all 3 of those to live under a single navigation item "Users" when you click on that by default you'd be accessing the User Resource but then from there provide tabs at the top of the User Resource to get to the Invite Resource and Role Resource.
I figure I could always make a tab widget (see attached) to switch between those resources, configure those resources to not register to the Nav, add a custom nav item for "Users" that will link to the User Resource but show as active when on any of those 3 resources.
I could even make the URL structure something like:
User Resource: /users/manage
Invite Resource: /users/invite
Role Resource: /users/roles
But I wonder if there is not a proper built in way to do this, like a subgroup of resources or something? But I couldn't find anything when I was looking though the docs but it wouldn't be the first time I missed something in the docs either.
3 Replies
We have sub navigation since v3.1 but no kind of sub resources. There are plugins that implement nested resources and it's on the roadmap for this year, if we find a good solution for this to be in core.
https://laraveldaily.com/post/filament-v3-nested-resources-trait-pages
This can be Beneficial
and Povilas also told in last that it can also be added in Core or they will make a seperate plugin
That is interesting, not quite what I am looking for in my case. But I will make a note of it for if I ever need that.