定制 moddril/modularsystem 二次开发

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

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

moddril/modularsystem

最新稳定版本:v1.0.0

Composer 安装命令:

composer require moddril/modularsystem

包简介

Laravel Modular Domain Package

README 文档

README

A lightweight Laravel modular domain system for building scalable, domain-driven applications.

🚀 Introduction

ModDril Modular System provides a clean and structured way to build Laravel applications using a Domain-based modular architecture.

Each module:

  • Has its own Service Provider
  • Loads its own routes automatically
  • Can be enabled or disabled
  • Is fully isolated
  • Is registered dynamically

Perfect for large applications, SaaS platforms, and Domain-Driven Design (DDD).

📦 Installation

Install via Composer:

composer require moddril/modularsystem

⚙ Publish Configuration (Optional)

php artisan vendor:publish --tag=moddril-config

This will publish:

config/moddril.php

🏗 Create a Module

php artisan make:module User

This will generate:

app/Domains/User/
├── Http/
│   ├── Controllers/
│   └── Requests/
├── Services/
├── Repositories/
├── Providers/
│   └── UserServiceProvider.php
├── Routes/
│   └── web.php

It will also register the module inside:

app/Domains/modules.json

🎮 Create a Module Controller

You can create a controller inside a specific domain using:

php artisan make:module-controller {domain} {controller}

Examples

Create a simple controller:

php artisan make:module-controller User UserController

Create a controller inside subfolders:

php artisan make:module-controller User Admin/UserController

This will generate: Or if using subfolders: If the directory does not exist, it will be created automatically.

If the controller already exists, the command will prevent overwriting it.

🔄 Enable / Disable Module

php artisan module:status {domain} {status}

Example:

php artisan module:status User enabled
php artisan module:status User disabled

📋 List All Modules

php artisan module:list

Example output:

+----------+----------+
| Module   | Status   |
+----------+----------+
| Admin    | Enabled  |
| User     | Disabled |
+----------+----------+

📄 modules.json Structure

Location:

app/Domains/modules.json

Example:

{
    "Admin": {
        "enabled": true
    },
    "User": {
        "enabled": false
    }
}

Only enabled modules are automatically registered.

✅ Requirements

  • PHP 8.1+
  • Laravel 10+

📄 License

This package is open-sourced software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-02-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固