Download the PHP package aesen/laravel-auto-request without Composer
On this page you can find all versions of the php package aesen/laravel-auto-request. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aesen/laravel-auto-request
More information about aesen/laravel-auto-request
Files in aesen/laravel-auto-request
Package laravel-auto-request
Short Description Automatically generate Laravel FormRequest classes from migrations
License MIT
Informations about the package laravel-auto-request
Laravel Auto Request
Automatically generate Laravel FormRequest classes (Store & Update) directly from your database migrations.
This package helps you eliminate repetitive boilerplate by reading migration definitions and converting them into validation rules and messages.
✨ Features
- Generate Store and Update FormRequest classes
- Parse rules directly from migrations
-
Automatically detects:
required/nullablestring,text,boolean,integerforeignId→existsunique
- Update requests automatically use
sometimes - Configurable validation language (
tr,en) - Customizable validation messages
- Overwrite protection
- Artisan command support
📦 Installation
Laravel will auto-discover the service provider.
⚙️ Configuration
Publish the config file:
This will create:
Available Options
🚀 Usage
Generate both Store & Update requests:
Generate only Store request:
Generate only Update request:
Generated files:
🧠 How It Works
The package scans the model's create table migration and converts column definitions into validation rules.
Example Migration
Generated Rules (Store)
Generated Rules (Update)
🌍 Validation Messages
Messages are generated automatically using the selected language.
Example (tr):
🛣 Roadmap
- [ ] Index-based unique detection
- [ ] Model fillable fallback
- [ ] Attribute translations
- [ ] Column comment parsing
- [ ] Custom rule presets
🧑💻 Author
Abdullah Emin Esen GitHub: https://github.com/AbdullahEminEsen
📄 License
MIT License