Skip to content

Laravel Model Builder, a poor attempt to reverse engineer a MySQL database to Laravel models.

License

Notifications You must be signed in to change notification settings

michaelkasper/laravel-model-builder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-model-builder

Laravel Model Builder, a poor attempt to reverse engineer a MySQL database to Laravel models.

Usage

Add the following to your composer.json:

"require": {
    "jimbolino/laravel-model-builder" : "dev-master"
}, 

Add to your routes.php:

Route::get('/generate/models', '\\Jimbolino\\Laravel\\ModelBuilder\\ModelGenerator5@start');

Run the url, and your models will be created in the storage\models folder so you have to manually copy them to your real models folder. Or better, use a tool like beyond compare to update your current models.

Known Issues

  • Relation to itself (parent_id, child_id etc) will result in duplicate function names
  • Multiple foreign keys between tables will also not work
  • correct detection of $timestamps value

About

Laravel Model Builder, a poor attempt to reverse engineer a MySQL database to Laravel models.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%