eoads/module-make
Composer 安装命令:
composer require eoads/module-make
包简介
Artisan command to scaffold Laravel modules with standard folder structure
README 文档
README
Artisan command to scaffold Laravel modules with a standard folder structure, with optional Vue frontend support.
Requirements
- PHP ^8.2
- Laravel 11 or 12
Installation
composer require eoads/laravel-module-make --dev
Laravel auto-discovers the service provider via the extra.laravel key in composer.json.
Usage
Backend only
php artisan module:make PurchaseOrder
Backend + Vue (TypeScript)
php artisan module:make PurchaseOrder --vue --ts
Backend + Vue (JavaScript)
php artisan module:make PurchaseOrder --vue --js
Overwrite an existing module
php artisan module:make PurchaseOrder --force
Generated structure
Backend only
Modules/PurchaseOrder/
├── app/
│ ├── Actions/
│ ├── DTOs/
│ ├── Enums/
│ ├── Events/
│ ├── Http/
│ │ ├── Controllers/
│ │ └── Requests/
│ ├── Models/
│ ├── Notifications/
│ ├── Observers/
│ ├── Policies/
│ ├── Providers/
│ │ └── PurchaseOrderServiceProvider.php
│ ├── Repositories/
│ ├── Services/
│ └── Support/
├── config/
├── database/
│ ├── factories/
│ ├── migrations/
│ └── seeders/
├── resources/
│ ├── assets/
│ └── views/
├── routes/
│ ├── api.php
│ └── web.php
├── tests/
│ ├── Feature/
│ └── Unit/
└── module.json
With --vue --ts or --vue --js
Adds the following inside resources/:
resources/
├── js/
│ ├── components/
│ ├── composables/
│ ├── pages/
│ │ └── Index.vue
│ └── index.ts ← .ts with --ts, .js with --js
└── views/
Auto-registered
After scaffolding, the command automatically:
- Adds the PSR-4 namespace
Modules\PurchaseOrder\→Modules/PurchaseOrder/app/tocomposer.json - Enables the module in
modules_statuses.json
Then run:
composer dump-autoload
Changelog
See CHANGELOG.md.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-18