Getting custom resource page into navigation sidebar

How to add a custom created resource page (under Filament/ResourceName/Pages/, not the one under Filament/Pages/) to the sidebar navi?

class AdStatisticList extends ListRecords {
    protected static ?string $navigationLabel = "XXX";
    protected static bool $shouldRegisterNavigation = true;


has no effect.

I thought about adding it via ServiceProvider:

 public function panel(Panel $panel): Panel
 {
        return $panel
          ...
          ->navigationItems([
              NavigationItem::make('Werbestatistik')->url(???)
          ])
          ...
}


but how to get the url of it (see ??? in the code? Tried

NavigationItem::make('Werbestatistik')->url(AdStatisticList::getUrl())


but this resulted in Call to a member function getId() on null error.
Was this page helpful?