User menu items, route not found

I added user menu item as per the docs (https://filamentphp.com/docs/3.x/panels/navigation#customizing-the-user-menu), but getting route not found error.

When I run php artisan route:list, I can see that the route is registered.

->userMenuItems([
    MenuItem::make()
        ->label('Profile')
        ->url(route(EditProfile::getRouteName('admin'))),
        //->url(route('filament.admin.pages.edit-profile')),
])
Solution
Try this ->url(fn () => route('filament.admin.pages.edit-profile'))
Was this page helpful?