Skip to main content
Filament is built on top of Laravel Livewire, providing seamless integration between Livewire components and Filament’s UI components. This page documents the Livewire integration points in Filament.

BasePage

The BasePage class is the foundation for all Filament pages and extends Livewire’s Component class.

Namespace

Inheritance

Extends: Livewire\Component Implements: HasActions, HasRenderHookScopes, HasSchemas

Methods

render()

Render the Livewire component.
View
Returns the component view with layout.
Example:

getView()

Get the view name for the component.
string
Returns the view name.

getLayout()

Get the layout view name.
string
Returns the layout view name.

getHeading()

Get the page heading.
string | Htmlable | null
Returns the page heading.

getSubheading()

Get the page subheading.
string | Htmlable | null
Returns the page subheading.

getTitle()

Get the page title.
string | Htmlable
Returns the page title.

getMaxContentWidth()

Get the maximum content width for the page.
Width | string | null
Returns the maximum content width.

getExtraBodyAttributes()

Get extra HTML attributes for the page body.
array<mixed>
Returns an array of HTML attributes.

Livewire Attributes

#[On(‘refresh-page’)]

The refresh event listener is automatically registered on all pages.
Example usage:

InteractsWithActions

Pages that implement HasActions use the InteractsWithActions trait, which provides Livewire methods for mounting and calling actions.

Key Methods

mountAction()

Mount an action modal.
string
The action name.
array
default:"[]"
Arguments to pass to the action.

callMountedAction()

Execute the mounted action.

InteractsWithSchemas

Pages that implement HasSchemas use the InteractsWithSchemas trait, which provides Livewire integration for forms and schema components.

Key Methods

getSchemas()

Get all schemas registered on the component.
array
Returns an array of schema instances.

getSchema()

Get a specific schema by name.
string | null
The schema name. Defaults to the default schema.
Schema | null
Returns the schema instance or null.

Livewire Properties

Protected Properties

$view

The view name for the component.

$heading

The page heading.

$subheading

The page subheading.

$maxContentWidth

The maximum content width.

Static Properties

$layout

The default layout view.

$title

The page title.

$formActionsAlignment

The alignment for form actions.

$formActionsAreSticky

Whether form actions should be sticky.

$hasInlineLabels

Whether forms should use inline labels.

Wire Loading States

Filament components automatically integrate with Livewire’s wire:loading directive. Example:

Wire Model Binding

Filament form components automatically use Livewire’s wire:model directive for data binding. Example:

Error Handling

Filament integrates with Livewire’s validation error handling.
You can customize validation error reporting by setting this property.