2017 © Pedro Peláez
 

library laravel-model-builder

builds eloquent models based on the tables and relations found in your mysql database

image

jimbolino/laravel-model-builder

builds eloquent models based on the tables and relations found in your mysql database

  • Tuesday, November 7, 2017
  • by Jimbolino
  • Repository
  • 5 Watchers
  • 23 Stars
  • 6,726 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 1 Open issues
  • 1 Versions
  • 9 % Grown

The README.md

laravel-model-builder

Laravel Model Builder, a poor attempt to reverse engineer a MySQL database to Laravel models., (*1)

Usage

Add the following to your composer.json:, (*2)

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

Add to your routes.php:, (*3)

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., (*4)

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

The Versions

07/11 2017

dev-master

9999999-dev

builds eloquent models based on the tables and relations found in your mysql database

  Sources   Download

GPL-3.0+

laravel eloquent models builder