The easiest way to get started with event sourcing in Laravel
Fund package maintenance!
Installs: 973 369
Open Issues: 7
- php: ^8.0
- ext-json: *
- illuminate/console: ^9.0|^10.0
- illuminate/database: ^9.0|^10.0
- illuminate/events: ^9.0|^10.0
- illuminate/support: ^9.0|^10.0
- phpdocumentor/reflection-docblock: ^5.2
- spatie/better-types: ^0.1.2
- spatie/laravel-package-tools: ^1.9
- spatie/laravel-schemaless-attributes: ^2.0
- symfony/finder: ^6.0
- symfony/property-access: ^6.0
- symfony/property-info: ^6.0
- symfony/serializer: ^6.0
- laravel/horizon: ^5.7
- mockery/mockery: ^1.4
- orchestra/testbench: ^7.0|^8.0
- pestphp/pest: ^1.22
- phpunit/phpunit: ^9.5.10
- spatie/fork: ^1.0
- spatie/pest-plugin-snapshots: ^1.1
- spatie/phpunit-snapshot-assertions: ^4.0
This package is auto-updated.
Last update: 2023-06-06 12:26:42 UTC
This package aims to be the entry point to get started with event sourcing in Laravel. It can help you with setting up aggregates, projectors, and reactors.
If you've never worked with event sourcing, or are uncertain about what aggregates, projectors and reactors are head over to the getting familiar with event sourcing section in our docs.
Event sourcing might be a good choice for your project if:
- your app needs to make decisions based on the past
- your app has auditing requirements: the reason why your app is in a certain state is equally as important as the state itself
- you foresee that there will be a reporting need in the future, but you don't know yet which data you need to collect for those reports
If you want to skip to reading code immediately, here are some example apps. In each of them, you can create accounts and deposit or withdraw money.
- Larabank built traditionally without event sourcing
- Larabank built with projectors
- Larabank built with aggregates and projectors
Event sourcing in Laravel course
If you want to learn more about event sourcing, check out our course on event sourcing in Laravel
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
You can find installation instructions and detailed instructions on how to use this package at the dedicated documentation site.
Upgrading from laravel-event-projector
This package supercedes laravel-event-projector. It has the same API. Upgrading from laravel-event-projector to laravel-event-sourcing is easy. Take a look at our upgrade guide.
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you've found a bug regarding security please mail email@example.com instead of using the issue tracker.
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Kruikstraat 22, 2018 Antwerp, Belgium.
We publish all received postcards on our company website.
The aggregate root functionality is heavily inspired by Frank De Jonge's excellent EventSauce package. A big thank you to Dries Vints for giving lots of valuable feedback while we were developing the package.
1 Quote taken from Event Sourcing made Simple
The MIT License (MIT). Please see License File for more information.