Skip to content

API reference ​

Everything below is public API, covered by semantic versioning: it does not change in a breaking way within 1.x. Anything not listed here is internal.

Traits ​

TraitUse it onWhat it does
Concerns\HasRelationPagesa resourceEvery relation manager gets its own page
Concerns\InteractsWithRelationPagea relation managerThis relation manager gets a page; reads the optional static properties below
Concerns\HasRelationNavigatora record page (view, edit, custom)The breadcrumb menu, and the page is listed in it

All in the Wit3\FilamentRelationNavigator namespace.

On a resource ​

All static, all optional.

MethodPurpose
hasRelationPage(string $slug): boolLeave a relation out
canAccessRelationPage(Model $record, string $slug): boolVeto a relation page for a record (pages, menu, global search, redirect)
relationPageHeader(Schema $schema): SchemaHeader above the relation on every relation page
getRelationPageHeaderActions(): arrayHeader actions of the relation pages
getRelationPageHeaderWidgets(): array, getRelationPageFooterWidgets(): arrayWidgets of the relation pages (they receive $record)
hasRelationPageLinks(): bool"Open as page" on its relation managers
configureRelationPageAction(Action $action, RelationManager $manager): ActionChange that action for this resource
hasRelationPageGlobalSearchActions(): boolGlobal search links for this resource
any option method, staticThe option for all the resource's pages

On a relation manager ​

All static, all optional. Properties need InteractsWithRelationPage; methods work without it.

Property or methodPurpose
$hasRelationPage, hasRelationPage(): boolA page for this relation manager or not
$relationPageSlug, getRelationPageSlug(): ?stringThe slug of its page
$hasRelationPageLink, hasRelationPageLink(): bool"Open as page" on its table
$hasRelationPageGlobalSearchAction, hasRelationPageGlobalSearchAction(): boolIts link under global search results
$hasRelationNavigatorBadge, hasRelationNavigatorBadge(): boolIts badge in the menu (the tab keeps its own)
getRelationPageTitle(Model $ownerRecord)Title of its page; null keeps the default
getRelationPageSubheading(Model $ownerRecord)Subheading of its page
getRelationPageBreadcrumb(Model $ownerRecord): ?stringLast breadcrumb of its page
relationPageHeader(), getRelationPageHeaderActions(), getRelationPageHeaderWidgets(), getRelationPageFooterWidgets()Like on the resource, for its page only
configureRelationPageAction(Action $action, RelationManager $manager): ActionChange its "Open as page" action

Filament's own isBadgeLazyLoaded() (or $isBadgeLazyLoaded) also makes its menu badge lazy.

On a record page (HasRelationNavigator) ​

Override any of them on the page:

MethodPurpose
the option methodsOptions for this page
getRelationNavigatorRecordNavigationQuery(): ?BuilderThe records previous and next walk through
withRelationNavigator(array $breadcrumbs): arrayAdd the menu to breadcrumbs you build yourself

A relation page class of your own ​

Extend Pages\RelationPage (or run php artisan make:filament-relation-navigator CustomerResource), and spread ...CustomerRelationPage::relationRoutes() into getPages().

MemberPurpose
protected static ?array $relationsOnly these slugs
protected static array $excludedRelationsNever these slugs
protected static ?string $contextPageKey of the page it stands for (default: the view page, else the edit page)
$title, $subheading, $breadcrumb, and every Filament page methodAs on any Filament page

Helpers ​

Static methods of RelationNavigator:

MethodPurpose
getItems(string $resource, Model $record, ...)The menu items of a record
getRecordSubNavigation(Page $page): arrayThe same items as Filament sub-navigation
getRelationManagerPageUrl(RelationManager $manager): ?stringThe page of a relation manager, for buttons of your own
getGlobalSearchResultActions(string $resource, Model $record): arrayGlobal search links, to merge into your own
configureRelationPageActionUsing(Closure $callback): voidChange every "Open as page" action
makeRelationPageAction(RelationManager $manager): ActionBuild that action
getRelationPageClass(string $resource): ?stringThe relation page class of a resource
RELATION_PAGE_ACTIONName of the "Open as page" action

RelationNavigatorItem (in $items): key, label, url, icon, badge, badgeColor, isActive, isBadgeDeferred, isRelationPage().

Routes, views and commands ​

  • Route names: {resource route base}.relations.{slug}, for getUrl('relations.orders', [...]).
  • Views: filament-relation-navigator::menu.github, menu.simple, menu.mobile, menu.partials.list, menu.partials.trigger-attributes. Their variables are listed under A preset of your own.
  • Commands: make:filament-relation-navigator {resource}, make:filament-relation-navigator-preset {name} --from=github|simple.
  • Translations: filament-relation-navigator::navigator.*.

Version 1.7.0, released 2026-11-14 · MIT License.