toniel / laravel-ddd
Domain-Driven Design (DDD) scaffolding for Laravel with support for Laravel Actions and Spatie Data
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/toniel/laravel-ddd
Requires
- php: ^8.1
- illuminate/console: ^9.0|^10.0|^11.0|^12.0
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
Requires (Dev)
- orchestra/testbench: ^7.0|^8.0|^9.0
- phpunit/phpunit: ^9.5|^10.0
Suggests
- lorisleiva/laravel-actions: Required for using ddd:action command (^2.0)
- spatie/laravel-data: Required for using ddd:data command (^4.0)
README
A powerful Domain-Driven Design (DDD) scaffolding package for Laravel with support for Laravel Actions and Spatie Data.
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
For complete documentation, please visit GitHub Repository.
Testing
composer test
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.