elgibor-solution/laravel-form-builder

A Laravel package for managing form builder resources.

Maintainers

Package info

github.com/elgiborsolution/laravel-form-builder

pkg:composer/elgibor-solution/laravel-form-builder

Statistics

Installs: 770

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.6 2026-05-25 04:05 UTC

This package is auto-updated.

Last update: 2026-05-26 10:08:12 UTC


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

https://esbuilder.web.app

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. Publish configuration

php artisan vendor:publish --provider="ESolution\DataSources\Providers\DataSourcesServiceProvider" --tag=datasources-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

  1. Create a data source for your table or custom SQL.
  2. Create an API config if you need a public dynamic endpoint.
  3. Use the form builder to define fields and bind select options.
  4. 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

Architecture

The package is organized around a small set of backend layers:

  • Controllers accept management requests for builders and runtime API requests.
  • Models store the configuration records such as data sources, API configs, listeners, permissions, and mappings.
  • Services turn configuration into executable queries.
  • Support classes resolve dynamic routes and normalize endpoint lookups.
  • Providers register routes, migrations, and configuration.

High-level flow:

  1. A developer creates a builder configuration.
  2. The configuration is persisted in Laravel models and database tables.
  3. The runtime route resolver finds the matching API config.
  4. The query service validates input, builds SQL, and returns the response.

Support

If you are documenting the package for your team, start with:

  1. Getting Started
  2. Data API Builder
  3. Form Builder