定制 andreyizmaylov/base-domain-structure 二次开发

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

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

andreyizmaylov/base-domain-structure

最新稳定版本:1.2.4

Composer 安装命令:

composer require andreyizmaylov/base-domain-structure

包简介

Base domain structure for Laravel applications

README 文档

README

A template scaffold that implements Domain-Driven Design principles for Laravel, providing a clean, opinionated structure so you can focus on what matters: your business domain.

🚀 Installation

composer require andreyizmaylov/base-domain-structure

🎯 Publish the configuration: *

php artisan vendor:publish --tag=base-domain-structure-config

🔄 Directory Structure Visualization

Here's a more detailed tree view of your configurable structure:

src/Balance/
├── ApplicationLayer/
│   └── UseCases/
│       └── UpdateBalanceUseCase.php
├── DomainLayer/
│   ├── Entities/
│   ├── Repository/
│   │   ├── AccountRepositoryInterface.php
│   │   └── BalanceTransactionRepositoryInterface.php
│   ├── Services/
│   │   ├── BalanceUpdateService.php
│   │   └── CreateTransactionsService.php
│   ├── Storage/
│   │   ├── AccountStorageInterface.php
│   │   └── BalanceTransactionStorageInterface.php
│   └── ValueObjects/
├── InfrastructureLayer/
│   ├── Repository/
│   │   ├── AccountRepository.php
│   │   └── BalanceTransactionRepository.php
│   └── Storage/
│       ├── AccountStorage.php
│       └── BalanceTransactionStorage.php
└── PresentationLayer/
    └── HTTP/V1/
        ├── Controllers/
        │   └── UpdateBalanceController.php
        ├── Requests/
        │   └── UpdateBalanceRequest.php
        ├── Responders/
        │   └── BalanceTransactionResponder.php
        └── routes.php

After publishing, you can modify default domain structure:

    'structure' => [
        'ApplicationLayer',
        'DomainLayer' => [
            'Entities',
            'ValueObjects',
            'Repository',
            'Storage'
        ],
        'InfrastructureLayer' => [
            'Repository',
            'Storage',
        ],
        'PresentationLayer' => [
            'HTTP' => [
                'V1' => [
                    'Controllers',
                    'Requests',
                    'Responders',
                    'routes.php'
                ]
            ]
        ],
    ],

📁 Customize Your Source Folder

By default, domains are created in app/src/. You can change this via your .env file:

BASE_DOMAIN_SRC_DIR=Domain

Commands

Create Context structured folder

php artisan make:context Balance

Create UseCase structured folder

php artisan make:use-case UpdateBalance Balance

🙏 Acknowledgements

Mehul Koradiya - For his foundational work on laravel-enterprise-structure, which inspired this package ❤️.

📄 License

The MIT License (MIT). See LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固