Looking for dedicated help with your Filament project? Work with Kirschbaum, the official Filament-partnered development agency.
Love Filament? We'd really appreciate your sponsorship to fund the maintenance and support of the project.
You are currently viewing the documentation for Filament 4.x, which is currently in beta and is not stable. Breaking changes may be introduced to releases during the beta period. Please report any issues you encounter on GitHub.
Looking for the current stable version? Visit the 3.x documentation.
Introduction
Installation
Filament requires the following to run:
PHP 8.2+
Laravel v11.28+
Tailwind CSS v4.0+
Installation comes in two flavors, depending on whether you want to build an app using our panel builder or use the components within your app’s Blade views:
Panel builder
Most people choose this option to build a panel (e.g., admin panel) for their app. The panel builder combines all the individual components into a cohesive framework. You can create as many panels as you like within a Laravel installation, but you only need to install it once.
Individual components
If you are using Blade to build your app from scratch, you can install individual components from Filament to enrich your UI.
Since Filament v4 is in beta, you will need to set the minimum-stability in your composer.json file to be beta before installing any packages. Either adjust it manually or via CLI:
composer config minimum-stability beta
Your composer.json should look like this:
{ "minimum-stability": "beta"}
Install the Filament Panel Builder by running the following commands in your Laravel project directory:
This will create and register a new Laravel service provider called app/Providers/Filament/AdminPanelProvider.php.
TIP
If you get an error when accessing your panel, check that the service provider is registered in bootstrap/providers.php. If it’s not registered, you’ll need to add it manually.
You can create a new user account using the following command:
Since Filament v4 is in beta, you will need to set the minimum-stability in your composer.json file to be beta before installing any packages. Either adjust it manually or via CLI:
composer config minimum-stability beta
Your composer.json should look like this:
{ "minimum-stability": "beta"}
Install the Filament components you want to use with Composer:
If you only want to use the set of Blade UI components, you’ll need to require filament/support at this stage.
New Laravel projects
Get started with Filament components quickly by running a simple command. Note that this will overwrite any modified files in your app, so it’s only suitable for new Laravel projects.
Existing Laravel projects
If you have an existing Laravel project, you can still install Filament, but should do so manually to preserve your existing functionality.
To quickly set up Filament in a new Laravel project, run the following commands to install Livewire, Alpine.js, and Tailwind CSS:
NOTE
These commands will overwrite existing files in your application. Only run them in a new Laravel project!
Run the following command to install the Filament frontend assets:
php artisan filament:install --scaffoldnpm installnpm run dev
During scaffolding, if you have the Notifications package installed, Filament will ask if you want to install the required Livewire component into your default layout file. This component is required if you want to send flash notifications to users through Filament.
Run the following command to install the Filament frontend assets:
To configure Filament’s styles, you need to import the CSS files for the Filament packages you installed, usually in resources/css/app.css.
Depending on which combination of packages you installed, you can import only the necessary CSS files, to keep your app’s CSS bundle size small:
@import 'tailwindcss';/* Required by all components */@import '../../vendor/filament/support/resources/css/index.css';/* Required by actions and tables */@import '../../vendor/filament/actions/resources/css/index.css';/* Required by actions, forms and tables */@import '../../vendor/filament/forms/resources/css/index.css';/* Required by actions and infolists */@import '../../vendor/filament/infolists/resources/css/index.css';/* Required by notifications */@import '../../vendor/filament/notifications/resources/css/index.css';/* Required by actions, infolists, forms, schemas and tables */@import '../../vendor/filament/schemas/resources/css/index.css';/* Required by tables */@import '../../vendor/filament/tables/resources/css/index.css';/* Required by widgets */@import '../../vendor/filament/widgets/resources/css/index.css';@variant dark (&:where(.dark, .dark *));
The important parts of this are the @filamentStyles in the <head> of the layout, and the @filamentScripts at the end of the <body>. Make sure to also include your app’s compiled CSS and JavaScript files from Vite!
NOTE
The @livewire('notifications') line is required in the layout only if you have the Notifications package installed and want to send flash notifications to users through Filament.