Showing a relationship on one infolist, but not on the other.

I have an InstallerResource that has an edit page and an onboarding page.
public static function getRelations(): array
{
return [
MarketsRelationManager::make(),
];
}

public static function getPages(): array
{
return [
'index' => ListInstallers::route('/'),
'create' => CreateInstaller::route('/create'),
'edit' => EditInstaller::route('/{record}/edit'),
'logs' => InstallerLogs::route('/{record}/logs'),
'onboarding' => InstallerResource\Pages\ViewInstallerOnboarding::route('/{record}/onboarding'),
];
}
public static function getRelations(): array
{
return [
MarketsRelationManager::make(),
];
}

public static function getPages(): array
{
return [
'index' => ListInstallers::route('/'),
'create' => CreateInstaller::route('/create'),
'edit' => EditInstaller::route('/{record}/edit'),
'logs' => InstallerLogs::route('/{record}/logs'),
'onboarding' => InstallerResource\Pages\ViewInstallerOnboarding::route('/{record}/onboarding'),
];
}
The problem is, that configuring getRelations() here, puts the Markets relationship on both the onboarding page and on the edit page. I only want it on the edit page. How do I exclude that relationship from the onboarding page?
3 Replies
LeandroFerreira
maybe adding this in the onboarding page
public function getRelationManagers(): array
{
return [];
}
public function getRelationManagers(): array
{
return [];
}
christhompsontldr
You're a genius! That worked. Many thanks.