Installation
Install Polyform and configure it for your Laravel application
Requirements
Make sure your environment meets these before installing:
- PHP: 8.2 or higher (8.4 supported)
- Laravel: 11.x or 12.x
- Vue: 3.x (for frontend components)
- Inertia.js: Latest version (for SPA functionality)
- Database: MySQL 8.0+, PostgreSQL 13+, SQLite 3.35+ or SQL Server 2019+
Step 1: Install via Composer
Pull in the package with Composer:
Laravel's auto-discovery handles the service provider, so you're good to go.
Step 2: Initialize Polyform
Run the init command to publish the config file and run migrations:
This will:
- Publish the
config/polyform.phpconfiguration file - Run migrations to create 9 tables (forms, form_fields, form_submissions, etc.)
- Create storage directories for file uploads (if using local disk)
polyform_ prefix by default. You can change this in the config file before running migrations. Step 3: Publish Vue Components (Optional)
Want to customize the Vue components? Publish them into your app:
This copies all Vue components from resources/ts/ to resources/js/vendor/polyform/ in your app.
Step 4: Import Components
Import the Polyform components in your Vue app:
If you published the components, import from your local vendor directory instead:
Step 5: Verify Installation
Check that everything is wired up correctly:
You should see the full Polyform config output. If you get an error, make sure the config file was published.
Next Steps
Before building your first form, take a look at the configuration options:
Configuration Reference
All the config options: table prefixes, file storage, caching, webhooks and more.
Troubleshooting
Migration Errors
If migrations fail because of table name conflicts, change the table_prefix in config/polyform.php and re-run:
Component Not Found Errors
Getting "Component not found" errors? Make sure your build tool resolves the Polyform components. For Vite, add an alias in vite.config.js: