maztch/laravel-generator 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

maztch/laravel-generator

Composer 安装命令:

composer require maztch/laravel-generator

包简介

Laravel API/Scaffold/CRUD Generator based on Mitul Golakiya (me@mitul.me).

README 文档

README

Other versions:

5.1.* | 1.0

Based on Mitul generator, this is a more simple scaffold and just need to be used in dev.

I did this beacuse i need more simple generator and keep all out the repo dependencies in production.

Diferences with Mitul:

There are no Requests and there are no Library/Repositories Base controller is removed (Maztch/Controller/AppBaseController) Added delete function in controller for DELETE method and keep destroy just as an alias.

Except for this, is exactly the same.

The artisan command can generate the following items:

  • Migration File
  • Model
  • Controller
  • View
    • index.blade.php
    • table.blade.php
    • show.blade.php
    • show_fields.blade.php
    • create.blade.php
    • edit.blade.php
    • fields.blade.php
  • adjusts routes.php

Documentation is in process...

Documentation

While we write the docs you can take a look to Mitul repo.

Installation

  1. Add this package to your composer.json:

     "repositories": [
         {
             "type": "git",
             "url": "https://github.com/mitulgolakiya/laracast-flash"
         }
     ],
     "require": {
         "laracasts/flash": "dev-master",
         "laravelcollective/html": "5.2.*@dev",
         "bosnadev/repositories": "dev-master",
         "maztch/laravel-generator": "dev-master"
     }
    
  2. Run composer update

     composer update
    
  3. Add the ServiceProviders to the providers array in config/app.php.

As we are using these two packages laravelcollective/html & laracasts/flash as a dependency.

So we need to add those ServiceProviders as well.

    Collective\Html\HtmlServiceProvider::class,
    Laracasts\Flash\FlashServiceProvider::class,
    Maztch\Generator\GeneratorServiceProvider::class,

Also for convenience, add these facades in alias array in config/app.php.

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

Configuration

Publish Configuration file generator.php.

    php artisan vendor:publish --provider="Maztch\Generator\GeneratorServiceProvider"

Publish & Initialization

Mainly, we need to do three basic things to get started.

  1. Publish some common views like errors.blade.php & paginate.blade.php.

  2. Publish api_routes.php which will contain all our api routes.

  3. Init routes.php for api routes. We need to include api_routes.php into main routes.php.

     php artisan maztch.generator:publish
    

maztch/laravel-generator 适用场景与选型建议

maztch/laravel-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 0, 最近一次更新时间为 2015 年 11 月 12 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「generator」 「api」 「migration」 「model」 「crud」 「scaffold」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 maztch/laravel-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 maztch/laravel-generator 我们能提供哪些服务?
定制开发 / 二次开发

基于 maztch/laravel-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

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