"Menu Item Not Showing in Filament FranchisePanelProvider"

Hello, I'm facing an issue with my Filament project where menu items do not appear on the FranchisePanelProvider screen. The menu items work perfectly fine on the AdminPanelProvider panel, but for some reason, they are not visible when added to FranchisePanelProvider.
public function boot(): void
{
Filament::serving(function () {
if (request()->path() === 'franchise') {
Filament::registerUserMenuItems([
UserMenuItem::make()
->label('Test Menu')
->url('/test-url')
->icon('heroicon-s-clipboard-list')
]);
} else {
Filament::registerUserMenuItems([
UserMenuItem::make()
->label('Bought Products')
->url(BoughtProductResource::getUrl())
->icon('heroicon-s-building-storefront')
]);
}
});
}
public function boot(): void
{
Filament::serving(function () {
if (request()->path() === 'franchise') {
Filament::registerUserMenuItems([
UserMenuItem::make()
->label('Test Menu')
->url('/test-url')
->icon('heroicon-s-clipboard-list')
]);
} else {
Filament::registerUserMenuItems([
UserMenuItem::make()
->label('Bought Products')
->url(BoughtProductResource::getUrl())
->icon('heroicon-s-building-storefront')
]);
}
});
}
Problem: The menu items display correctly on the AdminPanelProvider. The Test Menu or any other menu items added to the FranchisePanelProvider do not show up. What I've Tried: Debugged request()->path() to ensure the correct path is being checked. Tried checking the panel ID using Filament::getCurrentPanel()->getId(), but it still didn’t work. Cleared all caches (php artisan cache:clear, etc.). Checked user permissions and route access. Despite these attempts, the menu items still do not show up on the FranchisePanelProvider. Has anyone else faced this issue, or does anyone have suggestions on how to fix this? Thanks in advance!
No description
No description
1 Reply
Mehmet K.
Mehmet K.2mo ago
Up up
Want results from more Discord servers?
Add your server