Filament Panel Builder Installation (Filament Series — Part 2)
Before we can get started with filament panel builder installation, we must make sure that the following requirements are met before we can get started:
- PHP 8.1+
- Laravel v10.0+
- Livewire v3.0+
The first thing we need to do is to set up a new Laravel project with this command :
composer create-project laravel/laravel laravel-filament
For complete installation guide for your new Laravel project please refer to the following Laravel documentation guide, https://laravel.com/docs/10.x
When laravel installation finished, We can go to project directory using :
cd .\laravel-filament\
The second requirements that we need is, laravel livewire. Now we are trying to install laravel livewire using this command
composer require livewire/livewire
For complete installation guide for Laravel Livewire please refer to the following Laravel Livewire documentation guide, https://livewire.laravel.com/docs/quickstart
The next step is to Install the Filament Admin Panel by running the following commands in your Laravel project directory:
composer require filament/filament:"^3.2" -W
After all installation process finish, now we need to publish panel using this command
php artisan filament:install --panels
Before using the filament admin panel, we need to set up the.env file, and migrate the database like the initial setup of a new Laravel application.
.env file example setup:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_filament_db
DB_USERNAME=root
DB_PASSWORD=
migrate the database,
php artisan migrate
Now you can create a new user account for admin panel with the following command:
php artisan make:filament-user
Now you can go to http://127.0.0.1:8000/admin/login to access filament admin panel login page
This is what the admin panel will look like before we add a new menu for our application.
In the next article, we’ll dive into creating a user, role, and permission menu with basic CRUD operations using Filament. Stay tuned for a practical walkthrough that demonstrates how to leverage Filament’s powerful features to streamline the management of users, roles, and permissions in your Laravel applications. Don’t miss out on unlocking the full potential of Filament for your development projects!