Hide or override Dashboard
I am encountering an interesting issue. My clients requirement is to remove (for now) the default Dashboard, as shown in the first screenshot. I thought it should be pretty straightforward cause I saw the default dashboard registered in the
pages
method of the AdminPanelProvider
. Removing it didn't work.
Investigating a bit more I realized that I can also override the Dashboard
class and adjust it to my liking so that's what I did. I also removed all the discover
related methods and the widgets
method in hopes something went wrong somehow. Guess what? It didn't work.
I tried clearing the cache, clearing the browser cache, using a new browser to no results. I am 100% sure that I am missing something but I am out of options. This is my current code:5 Replies
just removing it from the ->pages() method works for me. Please share your actual code according to https://discord.com/channels/883083792112300104/1167015843020943390
Hi @awcodes thanks for the answer, that's what confuses me, it should work just like that.
There's a character limit on the post form so I couldn'r share the whole code as text, let me try here
you can put it in a Gist too and link to that
Here you go, this is my
AdminPanelProvider
file: https://gist.github.com/ptamayova/be69614cbb92cd0c23e4394ed01e41cf
And the CustomDashboard
file:
https://gist.github.com/ptamayova/0107ed91fca95b0543e3f5cc0399449eGist
AdminPanelProvider.php
AdminPanelProvider.php. GitHub Gist: instantly share code, notes, and snippets.
and if you remove CustomDashboard from the pages() method it's still showing up?
If you still want the custom dashboard but not have it in the navigation you are going to have to do a custom navigation.