F
Filament11mo 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
JJSanders11mo ago
I think you forgot to add the error message
Dhruva
DhruvaOP11mo 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
DhruvaOP11mo 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