Foxws
DDD · Scaffolding · Artisan
Laravel DDD

Organize your Laravel app into Domain-Driven Design layers.

Latest release
0.0.5
Requires
PHP ^8.4
Laravel
13.x
Licence
MIT
$ composer require foxws/laravel-ddd
Get started Source ↗

Introduction

Laravel DDD helps you organize a Laravel app using Domain-Driven Design (DDD) layers, instead of the framework's default app/ folder.

  • ddd:install sets up the layer folders and registers their namespaces in your composer.json.
  • ddd:make generates new classes straight into the right layer.

Installation

Install the package with Composer:

composer require foxws/laravel-ddd

You can publish the config file if you want to customize it:

php artisan vendor:publish --tag="ddd-config"

Usage

Install the DDD layer structure, then generate classes into it:

php artisan ddd:install
php artisan ddd:make CreateInvoice --type=action --domain=Billing

Learn more

Looking for Laravel Essentials' sensible defaults (Model::shouldBeStrict(), URL::forceHttps(), and more)? Those live in a separate package, foxws/laravel-essentials.