samrat415/laravel-ddd 问题修复 & 功能扩展

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

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

samrat415/laravel-ddd

最新稳定版本:v1.0.1

Composer 安装命令:

composer require samrat415/laravel-ddd

包简介

Laravel DDD Toolkit - A lightweight Laravel package to scaffold and manage Domain Driven Design (DDD) modules for APIs and Livewire frontends. Features automatic PSR-4 namespace registration, artisan commands for module creation, and seamless integration with Laravel Sail.

README 文档

README

Total Downloads

A Laravel package to scaffold and register Domain Driven Design (DDD) modules for APIs and Livewire frontends.

Features

  • Auto-registers domains/, src/, and frontend/ PSR-4 namespaces
  • Registers service providers automatically
  • Artisan commands to setup folder structures and modules
  • Supports portal-based domain APIs and frontend modules
  • Optional interactive prompts for portal creation

Installation

composer require samrat415/laravel-ddd

Autoload

You do not need to manually add namespaces to composer.json — the package does it for you automatically.

Commands

1. Install base folders and portals

php artisan ddd:install
  • Creates base folders: domains/, src/, frontend/ (if missing)
  • Prompts to add portals for domains and frontend

2. Create a new domain module

php artisan ddd:domain {portal/module}
  • Creates structure inside domains/{portal}/{module}, e.g.:
domains/Admin/Users/
├── Api/
├── Resources/
└── routes/v1.php
  • If portal is omitted, prompts to select or create one.

3. Create a new src module

php artisan ddd:src {module}
  • Creates structure inside src/{module}, e.g.:
src/Admin/
├── Controllers/
├── DTO/
├── Enums/
├── Livewire/       # only if livewire_support config enabled
├── Models/
├── Routes/web.php
├── Service/
└── Views/
  • Does not ask for portal, just creates the module folders.

Folder Overview

domains/      # API domains organized by portal
frontend/     # Livewire & Blade UI modules by portal
src/          # Core business logic and services

License

MIT License © samrat415

Ongoing Updates

This package is actively evolving. Upcoming features include a Filament-like, but simpler, module generator that:

  • Creates basic CRUD modules
  • Follows Domain Driven Design (DDD) patterns
  • Uses Livewire components
  • Works with your existing database tables

Stay tuned for more improvements and new tools to speed up your Laravel DDD development!

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-03