Download the PHP package amranibrahem/laravel-model-generator without Composer
On this page you can find all versions of the php package amranibrahem/laravel-model-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download amranibrahem/laravel-model-generator
More information about amranibrahem/laravel-model-generator
Files in amranibrahem/laravel-model-generator
Package laravel-model-generator
Short Description Automatically generate Eloquent models from database tables with professional PHPDoc, relationships, and multi-database support
License MIT
Homepage https://github.com/amranibrahem/laravel-model-generator
Informations about the package laravel-model-generator
Laravel Model Generator
🚀 Generate Eloquent Models Automatically from Database Tables
A powerful Laravel package that automatically generates Eloquent models from your database tables with professional PHPDoc, relationships, and casting.
✨ Features
- ✅ Auto-generate Eloquent models from database tables
- ✅ Professional PHPDoc with type hints and relationships
- ✅ Automatic relationship detection (hasMany, belongsTo, belongsToMany)
- ✅ Multi-database support (MySQL, PostgreSQL, SQLite)
- ✅ Smart model updating without overwriting custom code
- ✅ Custom namespaces and paths
- ✅ Beautiful console output with emojis
- ✅ Fillable properties & casting generation
- ✅ Table name singularization
- ✅ Many-to-Many relationships detection
🚀 Installation
You can install the package via Composer:
📖 Usage
1- Generate All Models
2- Generate Specific Tables
3- Generate with Relationships
4- Update Existing Models
5- Custom Path and Namespace
6- Combine Options
🎯 Examples
Generated Model Example
Many-to-Many Relationship Example
⚙️ Options
| Option | Description | Default |
|---|---|---|
--tables |
Specific tables to generate (comma separated) | All tables |
--path |
Models directory path | app/Models |
--namespace |
Models namespace | App\Models |
--relationships |
Auto generate relationships | false |
--force |
Update existing models with missing properties | false |
🔧 Supported Databases
- MySQL - Full support with foreign key detection
- PostgreSQL - Complete support with schema information
- SQLite - Basic support with table info
🎨 Console Output
⚡ Comparison with Alternatives
| Feature | This Package | krlove/eloquent-model-generator | reliese/laravel |
|---|---|---|---|
| Beautiful UI | ✅ | ❌ | ❌ |
| Model Updates | ✅ | ❌ | ❌ |
| Multi-DB Support | ✅ | ✅ | ✅ |
| Relationships | ✅ | ✅ | ✅ |
| PHPDoc Generation | ✅ | ✅ | ✅ |
| Zero Configuration | ✅ | ❌ | ❌ |
| Many-to-Many Detection | ✅ | ❌ | ✅ |
🐛 Reporting Issues
If you discover any issues, please use the GitHub issue tracker.
🏆 Credits
💡 Why Use This Package?
- Save Development Time - Generate models in seconds instead of hours
- Reduce Errors - Automatic relationship detection prevents mistakes
- Professional Code - PHPDoc and proper Laravel conventions
- Flexible - Works with existing projects and new ones
- Safe Updates -
--forceoption only adds missing properties - Multi-Database - Works with MySQL, PostgreSQL, and SQLite
🔗 Links
⭐ Star us on GitHub if this package helped you!
🚀 Happy coding!