elgibor-solution/laravel-form-builder
Composer 安装命令:
composer require elgibor-solution/laravel-form-builder
包简介
A Laravel package for managing form builder resources.
README 文档
README
Laravel Form Builder is a backend package for building dynamic data sources, reusable API configurations, and form-driven CRUD flows without writing a new controller for every use case. It is designed for teams that want a configurable, JSON-friendly builder layer on top of Laravel.
Live Demo
GitHub Repository
https://github.com/elgiborsolution/laravel-form-builder.git
Table of Contents
Features
- Dynamic form builder
- Data source builder
- API builder
- Import/export configuration
- Middleware support
- Dynamic validation
- Custom query support
- Reusable API configuration
- JSON-based configuration
- Dynamic select datasource
- Form API integration
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 will fall back to DB_CONNECTION and then mysql when this variable is not set. You can also read the resolved value from config:
config('laravel-form-builder.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.
Example:
GET /api/data-source/users-list/query?page=1&per_page=10
Response example:
{
"current_page": 1,
"data": [
{
"id": 1,
"name": "Alice",
"email": "alice@example.com"
}
],
"total": 1
}
Documentation
- Installation
- Getting Started
- 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 and normalize 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.
- The query service validates input, builds SQL, and returns the response.
Support
If you are documenting the package for your team, start with:
elgibor-solution/laravel-form-builder 适用场景与选型建议
elgibor-solution/laravel-form-builder 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.01k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 02 月 17 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 elgibor-solution/laravel-form-builder 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 elgibor-solution/laravel-form-builder 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 1.01k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Apache-2.0
- 更新时间: 2025-02-17