定制 e2tmk/skeleton-module 二次开发

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

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

e2tmk/skeleton-module

Composer 安装命令:

composer require e2tmk/skeleton-module

包简介

README 文档

README

Latest Version on Packagist

The Skeleton module serves as a template for creating new modules in the system. It provides a streamlined structure and a convenient command-line tool to quickly generate new modules based on this skeleton.

Installation

You can install the package via composer:

composer require e2tmk/skeleton-module

Requirements

  • PHP >= 8.2
  • Laravel >= 11.0
  • nwidart/laravel-modules >= 9.0

Module Structure

The Skeleton module contains a basic structure that follows best practices for module development:

  • Configuration files
  • Service provider setup
  • Basic directory structure
  • Composer configuration
  • Module manifest

Module Builder Command

The Skeleton module includes a powerful command-line tool called module-build that helps you quickly create new modules based on this template.

Usage

You can create a new module using the command:

php artisan module-build

Or specify the module name directly with the --name option:

php artisan module-build --name=MyNewModule

What it does

The module-build command performs the following operations:

  1. Creates a new module directory based on the provided name
  2. Copies all files from the Skeleton module to the new module
  3. Renames files and directories by replacing "Skeleton" with your module name
    • PascalCase substitution: "Skeleton" → "YourModuleName"
    • Lowercase substitution: "skeleton" → "yourmodulename"
  4. Updates file contents to replace all occurrences of "Skeleton" with your module name
  5. Updates specific files:
    • composer.json: Updates package name and namespaces
    • module.json: Updates name, alias, and provider paths
    • Service Provider: Updates namespace, class name, and properties
  6. Cleans up:
    • Removes .git directory if it exists
    • Removes vendor directory if it exists
    • Removes the ModuleBuildCommand from the new module
  7. Registers the module:
    • Updates modules_statuses.json to enable the new module
  8. Updates autoloader:
    • Runs composer dump-autoload to register the new namespaces

After Creation

Once your new module is created, it will be:

  1. Properly registered in the system
  2. Ready for development
  3. Accessible through its namespace (Modules\YourModuleName)

You can then start adding your specific functionality to the new module!

Best Practices

  • Use the module-build command to ensure consistency across all modules
  • Maintain the standard directory structure for new modules
  • Follow the naming conventions established by the Skeleton module

Example

To create a new "Reports" module:

php artisan module-build --name=Reports

This will create a fully functional Reports module with all necessary files and configurations.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Support

If you discover any issues or have questions, please open an issue on GitHub.

e2tmk/skeleton-module 适用场景与选型建议

e2tmk/skeleton-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 09 月 05 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-05