F
Filament10mo ago
Dhruva

Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()

I am getting folloiwng error when I am trying to add getRecordSubNavigation method in the resource
Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()
Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()
protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top;

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewRecord::route('/{record}'),
Pages\EditRecord::route('/{record}/edit'),
]);
}
protected static SubNavigationPosition $subNavigationPosition = SubNavigationPosition::Top;

public static function getRecordSubNavigation(Page $page): array
{
return $page->generateNavigationItems([
Pages\ViewRecord::route('/{record}'),
Pages\EditRecord::route('/{record}/edit'),
]);
}
4 Replies
JJSanders
JJSanders10mo ago
I think you forgot to add the error message
Dhruva
Dhruva10mo ago
HI @JJSanders The error I am receiving is
Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()
Call to undefined method Filament\Resources\Pages\PageRegistration::shouldRegisterNavigation()
Dhruva
Dhruva10mo ago
Thanks @JJSanders Its working now. But I am still not able to figure out what was the issue.
Want results from more Discord servers?
Add your server