Page class is the foundation for creating custom pages in Filament panels. Pages can include forms, widgets, actions, and custom content, and can be organized within navigation groups and clusters.
Namespace
Inheritance
Extends:Filament\Pages\BasePage
Implements: HasActions, HasRenderHookScopes, HasSchemas
Type Parameters
TConfiguration- The page configuration class (extendsPageConfiguration)
Static Methods
getUrl()
Generate a URL to this page.array<mixed>
default:"[]"
Additional route parameters.
bool
default:"true"
Whether to generate an absolute URL.
string | null
default:"null"
The panel ID. Defaults to the current panel.
Model | null
default:"null"
The tenant model for multi-tenancy.
bool
default:"false"
Whether to guess missing route parameters.
string | null
default:"null"
The configuration key.
string
Returns the generated URL.
registerRoutes()
Register the routes for this page.Panel
The panel instance.
PageConfiguration | null
Optional page configuration.
registerNavigationItems()
Register navigation items for this page.getNavigationItems()
Get the navigation items for this page.array<NavigationItem>
Returns an array of navigation items.
getRouteName()
Get the route name for this page.Panel | null
The panel instance. Defaults to the current panel.
string
Returns the route name.
getNavigationLabel()
Get the navigation label for this page.string
Returns the navigation label.
getNavigationIcon()
Get the navigation icon for this page.string | BackedEnum | Htmlable | null
Returns the icon identifier.
getNavigationGroup()
Get the navigation group for this page.string | UnitEnum | null
Returns the navigation group name.
getNavigationSort()
Get the navigation sort order for this page.int | null
Returns the sort order.
getNavigationBadge()
Get the navigation badge for this page.string | null
Returns the badge content.
getNavigationBadgeColor()
Get the navigation badge color.string | array<string> | null
Returns the badge color.
shouldRegisterNavigation()
Check if this page should register navigation items.bool
Returns
true if navigation should be registered.isDiscovered()
Check if this page should be automatically discovered.bool
Returns
true if the page should be discovered.getCluster()
Get the cluster this page belongs to.class-string<Cluster> | null
Returns the cluster class name or
null.Instance Methods
getLayout()
Get the layout view for this page.string
Returns the layout view name.
getBreadcrumbs()
Get the breadcrumbs for this page.array<string>
Returns an array of breadcrumb labels.
getFooter()
Get the footer view for this page.View | null
Returns the footer view or
null.getHeader()
Get the header view for this page.View | null
Returns the header view or
null.content()
Define the content schema for this page.Schema
The schema instance to configure.
Schema
Returns the configured schema.
getHeaderWidgets()
Get the widgets to display in the page header.array<class-string<Widget> | WidgetConfiguration>
Returns an array of widget configurations.
getFooterWidgets()
Get the widgets to display in the page footer.array<class-string<Widget> | WidgetConfiguration>
Returns an array of widget configurations.
getHeaderWidgetsColumns()
Get the column configuration for header widgets.int | array<string, ?int>
Returns the number of columns or responsive column configuration.
getFooterWidgetsColumns()
Get the column configuration for footer widgets.int | array<string, ?int>
Returns the number of columns or responsive column configuration.
getWidgetData()
Get data to pass to page widgets.array<string, mixed>
Returns an array of data to pass to widgets.
Properties
$cluster
$navigationGroup
$navigationIcon
$navigationLabel
$navigationSort
$shouldRegisterNavigation
Traits
CanAuthorizeAccess- Authorization checksHasErrorNotifications- Error notification handlingHasRoutes- Route managementHasSubNavigation- Sub-navigation supportInteractsWithHeaderActions- Header action management