vitalibr / laravel5-exporter by vitalibr

MySQL Workbench Schema Exporter for Laravel 5.0
1,044
16
2
Package Data
Maintainer Username: vitalibr
Maintainer Contact: mateus.c.vitali@gmail.com (Mateus Vitali)
Package Create Date: 2016-05-25
Package Last Update: 2021-03-14
Language: PHP
License: MIT
Last Refreshed: 2024-12-15 15:09:40
Package Statistics
Total Downloads: 1,044
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 16
Total Watchers: 2
Total Forks: 4
Total Open Issues: 3

Laravel 5.0 Exporter

Latest Stable Version Total Downloads Latest Unstable Version License

This is an exporter to convert MySQL Workbench Models (*.mwb) to Laravel Framework 5 Model and Migration Schema.

Prerequisites

  • PHP 5.4+
  • Composer to install the dependencies

Installation

php composer.phar require --dev vitalibr/laravel5-exporter

This will install the exporter and also require mysql-workbench-schema-exporter.

You then can invoke the CLI script using vendor/bin/mysql-workbench-schema-export.

Formatter Setup Options

Additionally to the common options of mysql-workbench-schema-exporter these options are supported:

Laravel Model

Setup Options

  • namespace

    Namespace for generated class.

    Default is App\Models.

  • parentTable

    Ancestor class, the class to extend for generated class.

    Default is Model.

  • generateFillable

    Generate variable fillable with all columns.

    Default is false.

Laravel Migration

Setup Options

  • tablePrefix

    Table prefix for generated class.

    Default is Create.

  • tableSuffix

    Table suffix for generated class.

    Default is Table.

  • parentTable

    See above.

    Default is Migration.

  • generateTimestamps

    Generate created_at and updated_at columns to all Tables.

    Default is false.

Command Line Interface (CLI)

See documentation for mysql-workbench-schema-exporter

Examples (v3.0.3)

Workbench Schema

alt tag

Model

alt tag

Migration

alt tag

Links