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:
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:Jump to 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 anymore9 Replies
You probably need to overwrite
getNavigationItems()
method as the List page is the default for the navigation.I already tried that but I still get the same error…
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
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
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
I thought of that to and clearing the caches didn't fix the problem
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 anymoreI think it would be good to mention this in the docs
I don't think it's common to remove the index page of a resource.