PHPackages                             mrgiant/form-builder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mrgiant/form-builder

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrgiant/form-builder
====================

A Laravel form-builder module: dynamic forms, questions, responses, approval workflows, with Vue 3 builder components and Blade renderers.

v0.1.11(1mo ago)020↓66.7%MITVuePHP ^8.2

Since Jul 4Pushed 1mo agoCompare

[ Source](https://github.com/mrgiant/form-builder)[ Packagist](https://packagist.org/packages/mrgiant/form-builder)[ Docs](https://github.com/mrgiant/form-builder)[ RSS](/packages/mrgiant-form-builder/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (9)Dependencies (6)Versions (13)Used By (0)

mrgiant/form-builder
====================

[](#mrgiantform-builder)

A Laravel form-builder module extracted from the GoldenHospital application: dynamic forms, questions/fields, responses, and an approval-workflow engine, with Vue 3 builder components and Blade renderers (including PDF templates).

- **Backend:** `Form`, `Question`, `Answer`, `FormResponse`, plus the workflow models (`FormResponseWorkflow`, `FormResponseWorkflowAction`, `FormWorkflowNode`, `FormWorkflowEdge`), 5 controllers, and all migrations.
- **Frontend:** a drag-and-drop question builder, a visual workflow builder, 12 field-type renderers, responses list, and an approvals inbox/tracker.
- **Views:** public form render (`custom_render`), pre-filled render, and PDF templates.

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Laravel `^12` or `^13`

### Host-provided dependencies

[](#host-provided-dependencies)

This package was **extracted from a monolith** and is designed to be consumed by that same application. The controllers and the `Translatable` concern therefore still reference a handful of classes that the **host app must provide**. These are intentionally left pointing at the `App\` namespace:

Referenced classUsed byPurpose`App\Http\Controllers\Controller`all controllersbase controller (auth/validation traits)`App\Models\User``WorkflowController`, `FormResponseWorkflowAction`, `Services\WorkflowRunner`approver identity`App\Notifications\GeneralNotficationMailsAttachment``AnswerController`submit-notification email (host-env: shells out to a node PDF script + hardcoded domain)`App\Http\Services\ReportsGenerator\PdfFooter``ResponsesController`PDF footer`App\Http\TranslatorAction\Translator`, `App\Models\Translation``Concerns\Translatable`i18n fieldsThe workflow engine and its collaborators now live **in the package** — `Mrgiant\FormBuilder\Services\WorkflowRunner`, `Mrgiant\FormBuilder\Notifications\FormWorkflowNotification`, and `Mrgiant\FormBuilder\Rules\UniqueAnswerResponses` — since they are form-domain logic, not host infrastructure. The remaining `App\` references above are genuine host concerns (identity, generic mail/PDF/Excel tooling, i18n).

Installation (local path repository)
------------------------------------

[](#installation-local-path-repository)

In the host app's `composer.json`:

```
"repositories": [
    { "type": "path", "url": "../form-builder", "options": { "symlink": true } }
],
```

then:

```
composer require mrgiant/form-builder:*
```

The service provider is auto-discovered. It will:

- load the package migrations (deduped by filename against the host's copies),
- register the `form-builder::` view namespace,
- register routes **only if** `config('form-builder.register_routes')` is true (off by default to avoid colliding with the host's existing form routes).

Publish what you want to customize:

```
php artisan vendor:publish --tag=form-builder-config      # config/form-builder.php
php artisan vendor:publish --tag=form-builder-views       # resources/views/vendor/form-builder
php artisan vendor:publish --tag=form-builder-assets      # resources/js/vendor/form-builder
php artisan vendor:publish --tag=form-builder-migrations  # only for a fresh host
```

Frontend
--------

[](#frontend)

The package ships **raw `.vue` source**. Publish it and register the components on your existing global Vue app:

```
// resources/js/app.js (host)
import { registerFormBuilder } from './vendor/form-builder';

registerFormBuilder(app, { lazy });   // reuse the host's lazy() wrapper
```

This registers: `forms-index`, `forms-manage-questions`, `forms-questions-answers`, `forms-responses-index`, `forms-workflow-builder`, `approvals-inbox`, `approval-tracker`, `form-charts`.

The components require `golden-logic-ui`, `vuedraggable`, and Vue 3 in the host. They also import a few **host-provided Vue libraries** via the `@` alias (`@` → `resources/js`), which the host must define in `vite.config.js`:

ImportProvided by host at`@/services/multilingualService``resources/js/services/``@/components/fields/*`shared field inputs (also used by other host features)`@/components/fieldsAnswer/*`shared answer-display inputs`@/components/Charts/Pie.vue`shared chart componentsThese are intentionally **not** bundled so the host owns a single copy (they are shared with other host features). Re-run the publish command after updating the package to refresh the copy under `resources/js/vendor/form-builder`.

Configuration
-------------

[](#configuration)

`config/form-builder.php`:

KeyDefaultMeaning`register_routes``false`Let the package own the form routes.`route_prefix``admin`URL prefix for the route group.`route_name_prefix``admin.`Route-name prefix (`admin.forms.*`).`middleware``['web', 'auth']`Middleware for the route group.`user_model``App\Models\User`Approver model.Cutover status (GoldenHospital host)
------------------------------------

[](#cutover-status-goldenhospital-host)

The cutover has been **performed** in the GoldenHospital host — the package is the source of truth for the module's models, controllers, and Vue components:

1. ✅ Host `app/Models/{Form,Question,Answer,FormResponse,FormResponse*,FormWorkflow*}.php`deleted; all references repointed to `Mrgiant\FormBuilder\Models\*`.
2. ✅ Host `app/Http/Controllers/Admin/{Forms,Questions,Answer,Responses,Workflow}Controller.php`deleted; `routes/web.php` + `routes/api.php` now reference the package controllers. (The route *definitions* stay in the host so they keep the host's admin middleware/locale/gate context; `register_routes` remains `false`.)
3. ✅ Host `resources/js/components/cruds/Forms/**` and `FormCharts.vue` deleted; `app.js` registers the components via `registerFormBuilder(app, { lazy })`from the published `resources/js/vendor/form-builder`.

Remaining (optional) hardening:

- Blade views still live in the host (the controllers render `admin.forms.*` / `forms.*`, which resolve to the host's layouts). The package ships its own copies under `form-builder::` for external consumers.
- Decouple the host-provided PHP classes and Vue libraries (tables above) for a fully standalone package.

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

12

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84cd2f20a482929d06040379b5c2363638c4dc66b0470d6b64176b97115195c7?d=identicon)[mrgiant](/maintainers/mrgiant)

---

Top Contributors

[![mrgiant](https://avatars.githubusercontent.com/u/8033419?v=4)](https://github.com/mrgiant "mrgiant (23 commits)")

---

Tags

laravelworkflowFormsvueform-builderapprovals

### Embed Badge

![Health badge](/badges/mrgiant-form-builder/health.svg)

```
[![Health](https://phpackages.com/badges/mrgiant-form-builder/health.svg)](https://phpackages.com/packages/mrgiant-form-builder)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M163](/packages/laravel-cashier)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)[forjedio/inertia-table

Backend-driven dynamic tables for Laravel + Inertia.js

272.0k](/packages/forjedio-inertia-table)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
