Download the PHP package syahmi-jalil/database-to-model without Composer
On this page you can find all versions of the php package syahmi-jalil/database-to-model. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download syahmi-jalil/database-to-model
More information about syahmi-jalil/database-to-model
Files in syahmi-jalil/database-to-model
Package database-to-model
Short Description Laravel package to generate models and migrations from existing database structure
License MIT
Informations about the package database-to-model
Database to Model
A Laravel package to generate models and migrations from existing database structure. This package allows you to reverse engineer your database into Laravel models and migrations, making it easier to work with existing databases or to create a backup of your database structure.
Installation
You can install the package via composer:
The package will automatically register its service provider.
Configuration
Publish the configuration file:
This will create a config/database-to-model.php
file where you can configure:
- Tables to ignore when generating models and migrations
- Default paths for generated files
- Maximum number of columns per migration file
Usage
Generate models and migrations for all tables:
Available Options
--tables
: Specific tables to generate (comma-separated)--connection
: Database connection to use (defaults to your default connection)
Examples
Generate for specific tables:
Use a different database connection:
Features
- Automatically generates models with proper relationships
- Creates migrations that match your existing database structure
- Handles foreign key constraints properly
- Sorts tables by dependencies to ensure proper migration order
- Customizable through configuration
Requirements
- PHP ^8.0
- Laravel ^9.0|^10.0|^11.0
Author
- Syahmi Jalil
All versions of database-to-model with dependencies
illuminate/support Version ^9.0|^10.0|^11.0
illuminate/console Version ^9.0|^10.0|^11.0
illuminate/database Version ^9.0|^10.0|^11.0