How to delete [index] resource page?
I have a resource named
SeriesResource
for which I only want the view
page as create
and edit
operations are handled via parent's ResourceManager
. When I remove the index
entry from the getPages
of the resource, it throws the following error.
Following is the code for my SeriesResource
3 Replies
In the context of the admin panel, I believe that page is required. But maybe you could redirect to the home page of your app (or other page) if anyone hits it?
Fixed it! The
index
page URL is generated in the following places.
1. Sidebar navigation
2. Cancel button on edit page (not using edit page)
3. Breadcrumbs
Since I'm not registering the resource in navigation the only thing that was giving me trouble was the breadcrumbs which after a deep dive into the Filament resource pages code I ended up overriding the getBreadcrumbs
method on the ViewSeries
page. I replaced the link to the index
page with the view
page of my parent/owner resource.
This is my implementation in the SeriesResource/Pages/ViewSeries
class.
Great find and thanks for following up with your solve!!