->userMenuItems([ 'profile' => MenuItem::make() ->label('Edit profile') ->url(UserResource::getUrl('edit', ['record' => Auth::user()])). I tried this but got error: Target class [hash] does not exist.
Solution
When you use this stuff in a Service Provider you need to wrap in in a Closure so that it's not evaluated right away, but when Filament needs it, because services aren't ready yet.