Download the PHP package desmart/laravel-event-sourcing without Composer
On this page you can find all versions of the php package desmart/laravel-event-sourcing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-event-sourcing
Laravel Event Sourcing
Simple Laravel implementation of event sourcing mechanism.
Be advised: this package is work in progress and some breaking changes may appear on the way.
Package realizes concept of event sourcing with Laravel framework. Package consists of two main elements: implementation of database-like event store and projection manager.
Event store is a append-only storage dedicated for storing events. Projection manager allows to register projections and update them with generated stream of events.
Installation
To install the package via Composer, simply run the following command:
In order to use provided event store implementation, register service provider in your config/app.php
file:
In order to use projection manager, register service provider in your config/app.php
file:
After registering service provider(s), run artisan command to publish configuration files:
Configuration
Package adds two configuration files: event-store.php
and read-model.php
.
event-store.php
Here you can configure:
- which connection will be used to connect with your event store,
- which event's payload serializer will be used.
read-model.php
Here you can register all projections that should be notified with stream of events.
Event store implementation
This package's event store implementation was successfully used/tested with MySql database, MongoDB database as well as with mix of the two: one database served as an event store, where second was storing projections.
Event store required structure (however different column types allowed) can be found here.
License
Package is released under the MIT License (MIT). Please, check LICENSE for more details.
Example usage
For example use of event store as well as project manager, check example/
directory.
Additionally, package provides artisan command for rebuilding all projections:
All versions of laravel-event-sourcing with dependencies
desmart/event-sourcing Version 1.*
illuminate/console Version 5.2.*
illuminate/contracts Version 5.2.*
illuminate/database Version 5.2.*
illuminate/support Version 5.2.*