定制 rjacobsen/eloquent-model-generator 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rjacobsen/eloquent-model-generator

最新稳定版本:1.0.2

Composer 安装命令:

composer require rjacobsen/eloquent-model-generator

包简介

Auto-generates all Eloquent models from the database in a Laravel 5 project.

README 文档

README

Auto-generates all Eloquent models from the database in a Laravel 5 project. This will also add all relation functions to your generated models (belongsTo, belongsToMany, hasMany, hasOne).

I'm also creating a ServiceProvider that will auto-generate basic CRUD functionality for these models. For now, you can use Laravel Administrator for this task.

##Installation

Add the following packages to your composer.json

"require-dev": {
    "xethron/migrations-generator": "dev-l5",
    "way/generators": "dev-feature/laravel-five-stable",
    "user11001/eloquent-model-generator": "dev-master"
}

You also need to point to the fork of the way/generators repo. See Xethron/migrations-generator for more info about this.

"repositories": [
    {
        "type": "git",
        "url": "git@github.com:jamisonvalenta/Laravel-4-Generators.git"
    }
]

Next, run composer update

Next, add the following service providers to your config/app.php

'Way\Generators\GeneratorsServiceProvider',
'Xethron\MigrationsGenerator\MigrationsGeneratorServiceProvider',
'User11001\EloquentModelGenerator\EloquentModelGeneratorProvider',

Lastly, make sure your .env file has correct database information

##Usage

php artisan models:generate

统计信息

  • 总下载量: 3.02k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-12