elgibor-solution / laravel-form-builder
A Laravel package for managing form builder resources.
Package info
github.com/elgiborsolution/laravel-form-builder
pkg:composer/elgibor-solution/laravel-form-builder
Requires
- php: >=8.2
- illuminate/cache: ^10.0|^11.0|^12.0|^13.0
- illuminate/database: ^10.0|^11.0|^12.0|^13.0
- illuminate/http: ^10.0|^11.0|^12.0|^13.0
- illuminate/routing: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
This package is auto-updated.
Last update: 2026-07-17 04:34:52 UTC
README
Laravel Form Builder is a backend package for building dynamic data sources, reusable API configurations, and form-driven CRUD flows on top of Laravel.
It is designed for teams that want a configurable, JSON-friendly builder layer without writing a new controller for every use case.
Live Demo
GitHub Repository
https://github.com/elgiborsolution/laravel-form-builder.git
Table of Contents
Features
- Data Source builder
- API Builder
- Form Builder
- Runtime variables
- Before execute hooks
- After execute listeners
- Parent and child table mapping
- Child update key support
- LOOP_INSERT array handling
- Route parameter expressions
- JSON field auto decoding
- Table-based and custom query data sources
- Filtering, pagination, and automatic ordering
- Import and export
- Validation rules and unique validation
- Soft delete support
- File upload field support
- Package Builder
database_scopefiltering and access validation
Installation
1. Require the package
composer require elgibor-solution/laravel-form-builder
2. Install the runtime registry scaffold
php artisan datasources:install
This command creates app/Runtime/AppRuntimeVariableRegistry.php only when it does not already exist.
No AppServiceProvider changes or manual registry binding are needed.
If you also want the package config published during install, use:
php artisan datasources:install --publish-config
3. Publish migrations
php artisan vendor:publish --provider="ESolution\DataSources\Providers\DataSourcesServiceProvider" --tag=datasources-migrations
4. Run migrations
php artisan migrate
5. Verify route prefix
By default, package routes are registered under the api prefix. You can adjust this in config/datasources.php or with environment variables such as:
DATASOURCES_ROUTE_PREFIX=api DATASOURCES_ROUTE_VERSION=
6. Configure the package database connection
Set the connection the package should use for its models, queries, and migrations:
LARAVEL_FORM_BUILDER_DB_CONNECTION=tenant
The package falls back to DB_CONNECTION when this variable is not set. You can also read the resolved value from config:
config('datasources.database_connection')
Quick Start
- Create a data source for your table or custom SQL.
- Create an API config if you need a public dynamic endpoint.
- Use the form builder to define fields and bind select options.
- Call the generated endpoint from your frontend or server-to-server integration.
- Use
X-Tenantto switch Package Builder scope automatically betweencentralandtenantrecords.
Example runtime request:
GET /api/data-source/users-list/query?page=1&per_page=10
Documentation
- Installation
- Getting Started
- Runtime Variables
- Data Source
- Data API Builder
- Form Builder
- Import / Export
- Authentication
- Examples
- Troubleshooting
- FAQ
Architecture
The package is organized around a small set of backend layers:
Controllersaccept management requests for builders and runtime API requests.Modelsstore the configuration records such as data sources, API configs, listeners, permissions, and mappings.Servicesturn configuration into executable queries.Supportclasses resolve dynamic routes, database scope, and endpoint lookups.Providersregister routes, migrations, and configuration.
High-level flow:
- A developer creates a builder configuration.
- The configuration is persisted in Laravel models and database tables.
- The runtime route resolver finds the matching API config or data source.
- The query service validates input, builds SQL or CRUD payloads, and returns the response.
Support
If you are documenting the package for your team, start with: