Filament requires the following to run:
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.
Install the Filament Panel Builder by running the following commands in your Laravel project directory:
composer require filament/filament:"^4.0"
php artisan filament:install --panelsWhen using Windows PowerShell to install Filament, you may need to run the command below, since it ignores ^ characters in version constraints:
composer require filament/filament:"~4.0"
php artisan filament:install --panelsThis will create and register a new Laravel service provider called app/Providers/Filament/AdminPanelProvider.php.
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:
php artisan make:filament-userOpen /admin in your web browser, sign in, and start building your app!
Install the Filament components you want to use with Composer:
composer require
filament/tables:"^4.0"
filament/schemas:"^4.0"
filament/forms:"^4.0"
filament/infolists:"^4.0"
filament/actions:"^4.0"
filament/notifications:"^4.0"
filament/widgets:"^4.0"You can install additional packages later in your project without having to repeat these installation steps.
When using Windows PowerShell to install Filament, you may need to run the command below, since it ignores ^ characters in version constraints:
composer require
filament/tables:"~4.0"
filament/schemas:"~4.0"
filament/forms:"~4.0"
filament/infolists:"~4.0"
filament/actions:"~4.0"
filament/notifications:"~4.0"
filament/widgets:"~4.0"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:
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 --scaffold
npm install
npm run devDuring 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.
Filament ships with a configuration file that allows you to override defaults shared across all packages. Publish it after installing the panel builder so you can review and customize the settings:
php artisan vendor:publish --tag=filament-configThis command creates config/filament.php, where you can configure options like the default filesystem disk, file generation flags, and UI defaults. Re-run the publish command any time you want to pull in newly added configuration keys before tweaking them to suit your project.