定制 germey/generator 二次开发

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

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

germey/generator

Composer 安装命令:

composer require germey/generator

包简介

Laravel Generator extends from Infyom Laravel Generator

README 文档

README

#Laravel Generator

Laravel Generator modified from Infyom Generator by Germey.

Introduction

Modified from Infyom. Because the former package generator the Non-elegant config file like config/infyom/laravel-generator.php, so this package changed it to config/generator.php.

Besides, this package changed the command name from infyom:command to generator:command.

Author

Installation

Add following packages into your composer.json.

"require": {
    "germey/generator": "~1.0",
    "laravelcollective/html": "^5.3.0",
    "doctrine/dbal": "~2.3"
}

If you want to generate a swagger annotations for your api documentation, you need to install following packages with it.

"require": {
    "infyomlabs/swagger-generator": "dev-master",
    "jlapp/swaggervel": "dev-master"
}

Add following service providers into your providers array in config/app.php.

Collective\Html\HtmlServiceProvider::class,
Laracasts\Flash\FlashServiceProvider::class,
Prettus\Repository\Providers\RepositoryServiceProvider::class,
Germey\Generator\GeneratorServiceProvider::class,

Add following alias to aliases array in config/app.php

'Form'      => Collective\Html\FormFacade::class,
'Html'      => Collective\Html\HtmlFacade::class,
'Flash'     => Laracasts\Flash\Flash::class,

Run the following command:

php artisan vendor:publish

Open app\Providers\RouteServiceProvider.php and update mapApiRoutes method as following:

Route::group([
    'middleware' => 'api',
    'namespace' => $this->namespace."\\API",
    'prefix' => 'api',
    'as' => 'api.',
], function ($router) {
    require base_path('routes/api.php');
});     

We have added as prefix to separate out named routes of api and web. Also its a better way to store api controllers in separate directory with separate namespace. so we have added "\\API" suffix in namespace.

Commands Usage

The former docs: Infyom

Commands have been changed from infyom:command to generator:command.

For example:

php artisan infyom:rollback $MODEL_NAME $COMMAND_TYPE 

changed to

php artisan generator:rollback $MODEL_NAME $COMMAND_TYPE 

Please remember replace all the infyom to generator.

统计信息

  • 总下载量: 23
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固