定制 toniel/laravel-ddd 二次开发

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

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

toniel/laravel-ddd

最新稳定版本:v0.2.1

Composer 安装命令:

composer require toniel/laravel-ddd

包简介

Domain-Driven Design (DDD) scaffolding for Laravel with support for Laravel Actions and Spatie Data

README 文档

README

Latest Version on Packagist GitHub Tests Action Status Total Downloads License

A powerful Domain-Driven Design (DDD) scaffolding package for Laravel with support for Laravel Actions and Spatie Data.

Note: This package is currently in early development (v0.x). The API may change before the stable 1.0 release. Feedback and contributions are welcome!

Features

  • 15 comprehensive commands for complete DDD workflow
  • Auto-generate domain structure with a single command
  • Auto-register ServiceProvider (Laravel 9-12)
  • Auto-load routes, migrations, and views
  • 3 controller types - Resource, API, Invokable
  • Laravel Actions integration (as Job, Controller, or standalone)
  • Spatie Laravel Data integration with validation
  • Inertia.js page generation (Vue & React with TypeScript)
  • Blade views with domain namespace
  • API Resources (single & collection)
  • Form Requests with validation
  • Jobs (queued & synchronous)
  • Mail classes with markdown support
  • Separate folders for Blade (Views) and Inertia (Pages)
  • PSR-4 autoloading
  • Fully tested with PHPUnit

Requirements

  • PHP ^8.1
  • Laravel ^9.0 | ^10.0 | ^11.0 | ^12.0

Installation

composer require toniel/laravel-ddd
php artisan ddd:install
composer dump-autoload

Quick Start

# Create a complete domain
php artisan ddd:domain Product
php artisan ddd:model Product Product -mfs
php artisan ddd:controller Product ProductController --api
php artisan ddd:page Product ProductIndex
php artisan migrate

Documentation

For complete documentation, please visit GitHub Repository.

Available Commands

Command Description
ddd:install Setup DDD structure
ddd:domain {name} Create new domain
ddd:controller {domain} {name} Create controller (Resource/API/Invokable)
ddd:model {domain} {name} Create model with optional migration/factory/seeder
ddd:migration {domain} {name} Create migration
ddd:factory {domain} {name} Create factory
ddd:seeder {domain} {name} Create seeder
ddd:action {domain} {name} Create Laravel Action
ddd:data {domain} {name} Create Spatie Data object
ddd:view {domain} {name} Create Blade view
ddd:page {domain} {name} Create Inertia page (Vue/React)
ddd:resource {domain} {name} Create API resource
ddd:request {domain} {name} Create form request
ddd:job {domain} {name} Create job
ddd:mail {domain} {name} Create mail class

Testing

composer test

Roadmap to 1.0

  • Community feedback and bug fixes
  • Additional generators (Events, Listeners, Policies, etc.)
  • More comprehensive test coverage
  • Documentation improvements
  • Real-world usage validation

Changelog

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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Security

If you discover any security related issues, please email l.toni2007@gmail.com instead of using the issue tracker.

Credits

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固