Introduction
Filament panels are the foundation of your admin interface. A panel is a complete admin dashboard that can include resources, pages, widgets, and more. You can have multiple panels in a single application, each with its own configuration, authentication, and routing.Creating a panel
Panels are typically registered in a service provider. The most common approach is to create aPanelProvider that extends Filament\Panel\PanelProvider:
The
id() method is required and must be unique across all panels in your application. It’s used to generate route names and identify the panel.Panel configuration basics
Every panel requires at minimum an ID to function. Beyond that, you can configure various aspects:Setting the path
Thepath() method defines the URL prefix for your panel:
/admin. You can also set an empty path to make it the root:
Default panel
You can mark a panel as the default panel, which is used when no specific panel context is available:Custom domains
You can configure a panel to run on a specific domain or subdomain:Registering components
Panels can discover or manually register resources, pages, and widgets.Auto-discovery
The easiest way to register components is using auto-discovery:Manual registration
You can also manually register specific components:Component caching
Filament automatically caches discovered components in production to improve performance. The cache is stored inbootstrap/cache/filament/panels/{panel-id}.php.
To clear the component cache, you can use:
Lifecycle hooks
You can hook into the panel’s boot process to perform custom setup:Multiple panels
You can register multiple panels in your application, each with different configurations:Accessing panel configuration
You can access the current panel from anywhere using theFilament facade:
Next steps
Configure resources
Learn how to create and configure resources within your panel.
Add custom pages
Discover how to create custom pages for your panel.
Set up authentication
Configure authentication and authorization for your panel.