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
-
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" } -
Run composer update
composer update -
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.
-
Publish some common views like
errors.blade.php&paginate.blade.php. -
Publish
api_routes.phpwhich will contain all our api routes. -
Init
routes.phpfor api routes. We need to includeapi_routes.phpinto mainroutes.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 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 maztch/laravel-generator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
Lets you add foreign keys in a swift! Foreign key adder in laravel migration.
A PSR-7 compatible library for making CRUD API endpoints
Manage PostgreSQL schemas in Laravel applications
Bitrix db migration core libs
The YADM migrations
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-12