albertoarena / laravel-event-sourcing-generator
Laravel event sourcing domain generator
Package info
github.com/albertoarena/laravel-event-sourcing-generator
pkg:composer/albertoarena/laravel-event-sourcing-generator
Requires
- php: ^8.3|^8.4|^8.5
- aldemeery/onion: ^1.0
- illuminate/contracts: *
- illuminate/support: *
- nikic/php-parser: ^5.1
- spatie/laravel-event-sourcing: ^7.9
Requires (Dev)
- jaschilz/php-coverage-badger: ^2.0
- larastan/larastan: ^3.0
- laravel/pint: ^1.1
- orchestra/testbench: ^9.0 || ^10.0 || ^11.0
- php-mock/php-mock-mockery: ^1.4
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.4 || ^12.0
This package is auto-updated.
Last update: 2026-07-03 06:26:26 UTC
README
Laravel event sourcing generator scaffolds complete domain structures for Spatie's Laravel Event Sourcing, providing a single Artisan command to generate events, projections, projectors, aggregates, reactors, actions, DTOs, notifications, and PHPUnit tests โ optionally straight from an existing migration.
๐ Documentation
Full documentation is at albertoarena.github.io/laravel-event-sourcing-generator.
- Installation
- Quick start
- Guide โ basic & advanced usage, domains, migrations, unit tests
- Command options reference
Installation
composer require albertoarena/laravel-event-sourcing-generator
Compatibility
| Laravel | PHP | Testbench |
|---|---|---|
| 11.x (deprecated) | 8.3, 8.4 | 9.x |
| 12.x | 8.3, 8.4, 8.5 | 10.x |
| 13.x | 8.3, 8.4, 8.5 | 11.x |
PHP: 8.3 โ 8.5 ยท Spatie Laravel Event Sourcing: 7.x
Quick start
php artisan make:event-sourcing-domain Animal --domain=Animal
This creates a complete event-sourced domain (events, projections, projectors, actions and DTOs) in app/Domain/Animal/Animal/. Add --aggregate=1, --reactor=1, --unit-test, --notifications=โฆ and more โ see the documentation for every option and worked examples.
Using Claude Code? Install the companion claude-laravel-event-sourcing skill to scaffold domains conversationally.
Changelog
Please see CHANGELOG for what has changed recently.
Contributing
Feel free to fork, improve and create a pull request. Please see CONTRIBUTING for details.
License
The MIT License (MIT). Please see LICENSE for more information.