ernestova / laranerators by ernestova

Laravel 5 generators from existing schema
53
5
2
Package Data
Maintainer Username: ernestova
Maintainer Contact: ernestova@gmail.com (Ernesto Vargas)
Package Create Date: 2015-10-15
Package Last Update: 2015-11-24
Language: PHP
License: MIT
Last Refreshed: 2024-04-18 03:01:21
Package Statistics
Total Downloads: 53
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 5
Total Watchers: 2
Total Forks: 0
Total Open Issues: 1

[Build Status] (https://travis-ci.org/ernestova/laranerators.svg) SensioLabsInsight

Model generator

Laravel 5 model generator for an existing MySql schema.

It reads your existing database schema and generates model class files based on the existing tables.

Installation

Add "ernestovargas/laranerators": "dev-master" to your require-dev section on your composer.json file.

Because the generators are only useful for development, add the provider in app/Providers/AppServiceProvider.php, like:

public function register()
{
    if ($this->app->environment() == 'local') {
        $this->app->register('ErnestoVargas\Generators\GeneratorsProvider');
    }
}

Help & Options

php artisan help make:models

Options:

  • --dir="" Model directory (default: "Models/")
  • --extends="" Parent class (default: "Model")
  • --fillable="" Rules for $fillable array columns (default: "")
  • --guarded="" Rules for $guarded array columns (default: "ends:_id|ids,equals:id")
  • --timestamps="" Rules for $timestamps columns (default: "ends:_at")
  • --ignore=""|-i="" A table names to ignore
  • --ignoresystem|-s List of system tables (auth, migrations, entrust package)