Download the PHP package muhammadmahedihasan/laravel-dynamic-forms without Composer
On this page you can find all versions of the php package muhammadmahedihasan/laravel-dynamic-forms. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download muhammadmahedihasan/laravel-dynamic-forms
More information about muhammadmahedihasan/laravel-dynamic-forms
Files in muhammadmahedihasan/laravel-dynamic-forms
Package laravel-dynamic-forms
Short Description A headless dynamic form builder for Laravel supporting surveys, quizzes, assessments, and monitoring etc.
License MIT
Informations about the package laravel-dynamic-forms
Laravel Dynamic Forms
A highly decoupled, event-driven, layout-agnostic dynamic form builder package for Laravel and Vue 3.
Form Builder Interface
Form Preview Interface
Features
- Decoupled Architecture: All UI alerts, page layouts, toast notifications, relationships, and navigation logic are delegated to the host application.
- Tailwind CSS Ready: Clean Tailwind markup with a customizable
ldf-*CSS class prefix namespace. - Multiple Locales: Configuration-driven multi-locale translation inputs (defaults to
en). - Interactive Drag & Drop: Easy elements library ordering powered by
vuedraggable.
Installation
1. Require the Package via Composer
2. Run Database Migrations
Run Laravel's migration command to create the package tables (form_inputs, dynamic_forms, form_elements, form_responses, form_response_items):
3. Run the Install Command
The install command will publish the package configuration, publish the Vue builder assets into your host application (resources/js/vendor/dynamic-forms), inject the vuedraggable peer dependency, and seed the default Form Inputs catalog into your database:
(Optional) If you ever need to manually seed or re-seed the default Form Inputs catalog, you can run:
4. Rebuild Your Assets
Compile the published frontend assets using your asset pipeline (e.g., Vite):
Vue 3 Integration Example
Since the form builder is fully decoupled, you should wrap it inside a page component in your host application. This allows you to wrap the form builder in your main layout, control the button loading states, perform API requests, and show custom toast notifications (e.g., using PrimeVue Toast).
Here is a complete, real-world wrapper component example (resources/js/pages/YourComponent.vue):
Component API
Props
| Prop | Type | Required | Description |
|---|---|---|---|
slug |
string |
No | Pass a slug to put the builder in Edit Mode and load an existing form structure. Omit/leave blank to put in Create Mode. |
apiPrefix |
string |
No | API prefix namespace for configuration and inputs (default: /api/v1/df). |
Events
@success: EmitssavedFormdata object when the package successfully saves/updates the form via internal API request.@cancel: Emits when the user triggers the back/go-back button.@error: Emits astringvalidation or network error message.
Custom UI Components (Provide/Inject)
Both the form renderer (RenderForm.vue) and the form builder preview support layout-agnostic component overrides. You can inject your own UI components using Vue 3's provide API:
If these are not provided, the package will automatically fallback to standard fallback HTML components.
Custom Styling
Tailwind CSS Colors Configuration
The package elements use Tailwind classes that reference a primary color palette. To ensure the elements render with correct branding colors, configure your host application's tailwind.config.js to define the primary colors:
Namespace Styling overrides
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-dynamic-forms with dependencies
illuminate/support Version ^11.0|^12.0|^13.0
illuminate/database Version ^11.0|^12.0|^13.0
illuminate/http Version ^11.0|^12.0|^13.0
illuminate/validation Version ^11.0|^12.0|^13.0