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

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

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

mqondisi/laravel-module-generator

Composer 安装命令:

composer require mqondisi/laravel-module-generator

包简介

Opinionated Laravel 9–13 module scaffolding (model, migration, repository, DTO, optional DAO, controllers)

README 文档

README

Opinionated scaffolding for Laravel: model, migration, repository (+ interface), Spatie-style DTO stub, optional DAO layer, and HTTP controllers. Skips existing files unless you pass --force.

Published on Packagist: mqondisi/laravel-module-generator

Requirements

  • PHP ^8.1
  • Laravel 9.x through 13.x (via illuminate/* ^9^13)

Installation

composer require mqondisi/laravel-module-generator

The service provider is auto-discovered; you do not need to register it manually in most apps.

For bleeding-edge changes from GitHub:

composer require mqondisi/laravel-module-generator:dev-master

Optional: Spatie Laravel Data

Generated DTOs under app/Data extend Spatie\LaravelData\Data. The package suggests installing Spatie in your application (it is not a hard dependency of this package, to avoid unnecessary transitive conflicts):

composer require spatie/laravel-data:^4

Usage

php artisan make:module Customer --api
php artisan make:module Customer --inertia
php artisan make:module Customer --tenant
php artisan make:module Customer --with-dao
php artisan make:module Customer --api --tenant --with-dao

Flags can be combined. With both --api and --inertia, an API controller and a web Inertia controller are generated (plus a page stub when Inertia is used).

Option Effect
--api JSON API controller under app/Http/Controllers/Api
--inertia Web controller + page stub under resources/js/Pages/.../ (Index.vue, Index.jsx, or Index.svelte)
--inertia-stack With --inertia: vue (default), react, or svelte — picks stub file and extension
--tenant team_id on migration, model global scope / scopeTeam, tenant docblocks
--with-dao app/DAO + app/DAO/Interfaces; repository depends on the DAO only
--force Overwrite files that already exist (use with care)

Examples:

php artisan make:module Customer --inertia --inertia-stack=react
php artisan make:module Customer --inertia --inertia-stack=svelte

After a run, the command prints Created, Skipped, and Overwritten lines plus a short summary.

Repository bindings

The generator creates or updates app/Providers/RepositoryServiceProvider.php and may append your provider to config/app.php when that file uses the usual AppServiceProvider::class marker (Laravel 9–10 style). On Laravel 11+, register App\Providers\RepositoryServiceProvider::class in bootstrap/providers.php if it is not picked up automatically.

License

MIT

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-30