How do we overwrite all resource pages?

I'm trying to change how the heading works across all pages without editing them all. Tried using macro but this doesn't get called. Also tried aliasing the BasePage class. Is there another way?
\Filament\Pages\BasePage::macro('getHeading', function (): string|Htmlable {
    return 'Test Heading';
});
Was this page helpful?