1. Installing the panel builder
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 --panels
This will create and register a new Laravel service provider called app/Providers/Filament/AdminPanelProvider.php
2. Creating an user
You can create a new user account using the following command:
php artisan make:filament-user
3. Creating a resource
To create a resource for the app\Models\Customer model:
php artisan make:filament-resource Customer
This will create several files in the app/Filament/Resources directory:
.
+-- Customers
| +-- CustomerResource.php
| +-- Pages
| | +-- CreateCustomer.php
| | +-- EditCustomer.php
| | +-- ListCustomers.php
| +-- Schemas
| | +-- CustomerForm.php
| +-- Tables
| | +-- CustomersTable.php