delete index

The documentation says that we can delete any resource page we want (https://filamentphp.com/docs/3.x/panels/resources/getting-started#deleting-resource-pages), however when I delete the index page of my CompanyResource I get the following error:
Route [filament.companies-panel.resources.companies.index] not defined.
Route [filament.companies-panel.resources.companies.index] not defined.
I initially made a custom page but very soon I noticed some major disadvantages, f.e I downloaded the Apex Chart plugin and when initliazing a new chart the CLI asks for a resource, but when using a custom page you don't have one. So I decided to use a resource, the only page a logged in user is allowed to see is the edit page. So I wanted to disable the index and view pages. But than I run into the problem I mentioned before. What is the best way to achieve this scenario: a custom panel for companies, a company can login and edit just their own company fields and also see and edit their employees which do have a table but must also be addable/edditable in the edit company view using a relationmanager.
Solution:
I think I fixed it! I had to disable the breadcrumbs on the panel ->breadcrumbs(false) the breadcrumbs propably refer to the index page which doesn't exists anymore
Jump to solution
9 Replies
Dennis Koch
Dennis Koch2w ago
You probably need to overwrite getNavigationItems() method as the List page is the default for the navigation.
AthroHiro
AthroHiro2w ago
I already tried that but I still get the same error…
Dennis Koch
Dennis Koch7d ago
Where is that error coming from? Can you share the stack trace? If you still have the Flare error page you can share errors with that
toeknee
toeknee7d ago
It's likely because index has been removed but the call is still in the resource in the getPages function I have noticed routes cached, and sometimes you need to remove the boostrap/cache
AthroHiro
AthroHiro7d ago
This is the flare error: https://flareapp.io/share/q5YxDbj7
Flare
Route [filament.companies-panel.resources.companies.index] not defined. - The error occurred at https://lookster.test/companies-panel/companies/5/edit
AthroHiro
AthroHiro7d ago
I thought of that to and clearing the caches didn't fix the problem
Solution
AthroHiro
AthroHiro7d ago
I think I fixed it! I had to disable the breadcrumbs on the panel ->breadcrumbs(false) the breadcrumbs propably refer to the index page which doesn't exists anymore
AthroHiro
AthroHiro7d ago
I think it would be good to mention this in the docs
Dennis Koch
Dennis Koch7d ago
I don't think it's common to remove the index page of a resource.
Want results from more Discord servers?
Add your server
More Posts