dayne-valourite / form-builder
A Laravel Filament form builder plugin.
v0.0.1
2025-06-27 14:38 UTC
Requires
- php: ^8.2
- filament/filament: ^4.0
- laravel/framework: ^12.0
- spatie/laravel-package-tools: ^1.0
README
Form Builder is a Laravel package built on top of Filament v4, allowing you to visually build and manage dynamic forms from your admin panel.
It lets you attach custom forms to any Eloquent model in your application with minimal setup.
β¨ Features
- Built with Filament v4 components
- Define forms from your Filament panel UI
- Attach forms to any Laravel model
- Persist form definitions in the database
- All form fields are stored in a single model column
- Supports multiple form versions per model (coming soon)
- Easily extendable and configurable
π¦ Installation
Requires Laravel 11+ and Filament 4+
Step 1: Install via Composer
composer require dayne-valourite/form-builder
Or, if youβre developing locally:
composer require dayne-valourite/form-builder --dev
Step 2: Publish and run migrations
php artisan vendor:publish --tag=form-builder-config php artisan migrate
Step 3: Register the plugin in your Filament panel
In your PanelProvider
:
use Valourite\FormBuilder\FormBuilderPlugin; public function panel(Panel $panel): Panel { return $panel // ... ->plugins([ FormBuilderPlugin::make(), ]); }
π§© Usage
- Create your own Laravel model, e.g.:
php artisan make:model Client -m
- Add a
form_fields
column to that model's migration:
$table->json('form_fields')->nullable();
- Configure allowed models in your
config/form-builder.php
:
'models' => [ App\Models\Client::class, App\Models\Project::class, ],
-
Go to your Filament admin panel β Navigate to the Forms resource β Create a form β Assign it to your model (e.g.,
Client
). -
The form data will be stored in the
form_fields
column on each model instance.
π§ͺ Testing & Contributing
Feel free to test, modify, and extend the package! Pull requests, ideas, and improvements are welcome.
π§ Roadmap
- Attach forms to any model
- Store form definitions in DB
- Save submissions
- Multi-page form support
- Field-level validation and logic
- Live preview / builder editor
π License
MIT Β© Dayne Valourite