akshaysmohite / filament-form-generator
Visual drag-and-drop form schema builder and PHP code generator for Filament v3.2+.
Package info
github.com/akshaysmohite/filament-form-generator
Language:Blade
pkg:composer/akshaysmohite/filament-form-generator
Requires
- php: ^8.1|^8.2|^8.3
- filament/filament: ^3.2
- illuminate/contracts: ^10.0|^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^8.0|^9.0
- pestphp/pest: ^2.0|^3.0
- phpunit/phpunit: ^10.0|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Visual drag-and-drop builder that writes Filament form PHP for developers. Arrange fields in the panel, then copy a Forms\Components schema into a Resource, Page, or Livewire component.
This free release supports Filament v3.2+ on Laravel 10 and 11. Filament 4 and 5 are not part of this version.
It generates code you paste into your app. It does not store form submissions or publish a public form URL.
Requirements
| Package | Version |
|---|---|
| PHP | 8.1, 8.2, or 8.3 |
| Laravel | 10.x or 11.x |
| Filament | 3.2+ (tested on 3.3.x) |
Features
- Drag-and-drop canvas with reordering and nesting
- Layout:
Section,Grid - Fields:
TextInput(text, email, numeric, password, tel, url),Textarea,Select,Toggle,Checkbox,Radio,DatePicker - Inspector for labels, names, validation, column span, and options
- PHP export as a schema array or a full
form()method, with imported classes or FQCN - Copy to clipboard, JSON import/export, full-screen workspace
- Available in
localandtestingby default
Installation
composer require akshaysmohite/filament-form-generator php artisan filament:assets
Run php artisan filament:assets again after each upgrade so the builder script stays current.
Register the plugin in app/Providers/Filament/AdminPanelProvider.php:
use Akshay\FilamentFormGenerator\FilamentFormGeneratorPlugin; public function panel(Panel $panel): Panel { return $panel // ... ->plugins([ FilamentFormGeneratorPlugin::make() ->navigationGroup('Development') ->navigationIcon('heroicon-o-wrench-screwdriver') ->navigationLabel('Filament Form Generator'), ]); }
Open the panel and choose Filament Form Generator. On a default panel the page is /admin/filament-form-generator.
Configuration
php artisan vendor:publish --tag="filament-form-generator-config"
The page is limited to local and testing:
// config/filament-form-generator.php 'allowed_environments' => [ 'local', 'testing', ],
Use ['*'] to allow every environment, or authorize in the panel provider:
FilamentFormGeneratorPlugin::make() ->authorize(fn () => auth()->user()?->isSuperAdmin());
Planned Pro edition
This package is free while we see whether developers want a fuller builder. Pro would add the pieces that are slow to write by hand:
- Repeater and Builder
- Wizard, Tabs, and Fieldset
- File upload, rich editor, markdown, tags, key-value, and color picker
- Relationship selects
- Conditional visibility
If you would use those, open a GitHub issue titled Pro interest. Name the fields you need, and say what a one-time license would be worth to you. A Filament 4 build would be a separate release.
Local development
Point a Laravel app at this checkout:
"repositories": [ { "type": "path", "url": "../filament-form-generator", "options": { "symlink": true } } ], "require": { "akshaysmohite/filament-form-generator": "@dev" }
composer update akshaysmohite/filament-form-generator php artisan filament:assets
The sibling app filament-form-generator-demo is the local preview. Sign in with preview@example.com / password123, then open /admin/filament-form-generator.
Tests
php tests/CodeGeneratorTest.php
License
MIT. See LICENSE.md.