My custom filament page is showing the wrong sidebar from different panel
Issue: When i'm on my custom filament page it's showing the wrong sidebar from the AdminPanel even when there is no /admin in the URL.
What i tried: When i use ->default() on the UserPanelProvider instead the AdminPanelProvider it works but causing other errors in my app.
i also removed /resources/views/vendor; upgraded filament and cleared cache.
What i want: it should display the correct sidebar with the current settings below or do i really need to use ->default() on the UserPanelProvider and if yes why?
Solution:Jump to solution
Oh shit, now i know my mistake 🤦♂️, i commented out ->discoverPages and didn't add my page in ->pages([]). It works now, thanks for helping. Also i removed it from web.php
5 Replies
I would guess it's how you register pages, etc. to the panel
How do you register that page?
Path for
UserPanel
maybe should be /
i made a new page for testing with
php artisan make:filament-page TestPage
and selected the user panel and then register it in web.php
with Route::get('test-page', \App\Filament\Pages\TestPage::class);
and then i get the sidebar from the admin. Also i now use ->path('/')
in UserPanelProviderWhy do you add route in the web.php?
Solution
Oh shit, now i know my mistake 🤦♂️, i commented out ->discoverPages and didn't add my page in ->pages([]). It works now, thanks for helping. Also i removed it from web.php