#Two list sfor one resource

4 messages · Page 1 of 1 (latest)

winter oxide
#

I have two lists for a single resource: UserInvoiceResource, which includes ListUserInvoice and ListProforma (both using the same '$model'). I've tried adding them as NavigationItems, but the active button on the sidebar isn't working as expected. Does anyone know how to fix this?"

Thanks

neat otterBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

limpid echo
#

Perhaps you could try something like this on your Navitem?:

NavigationItem::make('user_invoices')
// ...
  ->isActiveWhen(fn () => request()->routeIs('filament.admin.resources.user-invoices.index')),

🤔

winter oxide
#

yes i try it, but it make active on sidebar both of lists