DDD · Scaffolding · Artisan
Laravel DDD
Organize your Laravel app into Domain-Driven Design layers.
Latest release
0.0.6
Requires
PHP ^8.4
Laravel
13.x
Licence
MIT
$ composer require foxws/laravel-ddd
Introduction
Laravel DDD helps you organize a Laravel app using Domain-Driven Design (DDD) layers, instead of the framework's default app/ folder.
ddd:installsets up the layer folders and registers their namespaces in yourcomposer.json.ddd:makegenerates 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
- Domain Driven Design — the layers,
ddd:install, andddd:make. - Configuration Reference — every
config/ddd.phpoption.
Looking for Laravel Essentials' sensible defaults (Model::shouldBeStrict(), URL::forceHttps(), and more)? Those live in a separate package, foxws/laravel-essentials.
