Download the PHP package mphp/laravel-db2form without Composer
On this page you can find all versions of the php package mphp/laravel-db2form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mphp/laravel-db2form
More information about mphp/laravel-db2form
Files in mphp/laravel-db2form
Package laravel-db2form
Short Description Generate Blade forms and FormRequest classes from DB or JSON schemas!
License MIT
Homepage https://www.mbparvez.me/projects/laravel-db2form
Informations about the package laravel-db2form
Laravel Database To Form
Automatically generate Blade forms and Form request classes from your database schemas or JSON schema files with old() support and built-in CSS styling.
Package Name
laravel-schema-to-form
Composer: mbparvez
GitHub: mbparvezme
Author: M B Parvez
Features
- Generate JSON schemas from database tables.
- Generate Blade forms automatically with:
old()function for preserving input valuesrequiredattributes- Default values
- Correct input types (
text,email,checkbox,textarea, etc.) - Built-in CSS classes (Bootstrap or custom)
- Generate Laravel FormRequest classes with proper validation rules.
- Fully customizable templates for Blade and FormRequest.
- Configurable FormRequest namespace and Blade output directory.
Installation
Install via Composer:
Laravel will auto-discover the package. No extra steps needed to use it.
Commands
1. Generate JSON from DB Tables
Options:
--tables=users,posts→ generate JSON only for selected tables--output=custom/path→ save JSON files in a custom folder
2. Generate Blade Forms and FormRequest
Options:
--schema=path/to/schema.json→ generate form for a single schema file--output=resources/views/custom_forms→ save Blade files in a custom folder
3. Generate JSON + Form Together
This core command runs both form:generate-json and form:generate-form in sequence.
Use it to generate everything (JSON schemas, Blade forms, and FormRequest classes) at once.
Example Workflow
1. Generate JSON from database tables:
This will create JSON files in database/form_schemas/.
2. Generate Blade forms and FormRequests from JSON:
This will generate:
- Blade files in
resources/views/forms/ - FormRequest classes in
app/Http/Requests/ - Input fields automatically include old() values and CSS classes
3. Generate Both JSON and Forms in One Step:
This will automatically:
- Generate JSON schemas from the database
- Generate Blade forms and FormRequests
Publish Templates and Config (Optional)
Publish templates and config if you want to customize:
- Templates:
resources/form-schema-templates - Config:
config/form-schema.php
Configuration
config/form-schema.php:
Customizing Templates
After publishing, you can edit:
resources/form-schema-templates/form.blade.php.template→ for custom Blade layoutresources/form-schema-templates/request.php.template→ for custom FormRequest template
Contribution
Contributions are welcome! If you have ideas for improvement, bug fixes, or want to add new features:
- Fork the repository
- Create a new branch (
feature/new-feature) - Commit your changes
- Push to your branch
- Open a pull request
License
All versions of laravel-db2form with dependencies
illuminate/console Version 12.*
illuminate/database Version 12.*