Laravel adapter for EventSauce. Before using this package you should already know how to work with EventSauce.
- PHP ^7.2
- Laravel ^5.8
Via Composer
composer require chocofamilyme/laravel-eventsauce
You can publish and modify default migrations tables (domain_messages
, snapshots
) with the following command:
php artisan vendor:publish --tag="eventsauce-migrations"
php artisan migrate
You can publish the config file with the following command:
php artisan vendor:publish --tag="eventsauce-config"
Types, commands and events can be generated starting from a yaml file. Here you can specify the input and the output of the code generation. More info on code generation here: https://eventsauce.io/docs/getting-started/create-events-and-commands
The default database connection can be modified by setting the EVENTSAUCE_CONNECTION
env variable:
EVENTSAUCE_CONNECTION=mysql
The default table name for your domain messages can be set with the EVENTSAUCE_TABLE
env variable:
EVENTSAUCE_TABLE=domain_messages
The default table name used to store snapshots can be set with the EVENTSAUCE_SNAPSHOT_TABLE
env variable:
EVENTSAUCE_SNAPSHOT_TABLE=snapshots
This class will be used to store messages. You may change this to any class that implements EventSauce\EventSourcing\MessageRepository
, by default used Chocofamily\LaravelEventSauce\MessageRepository::class
This class will be used to store snapshots. You may change this to any class that implements EventSauce\EventSourcing\Snapshotting\SnapshotRepository
, by default used Chocofamily\LaravelEventSauce\SnapshotRepository::class
This class will be used to put message on the handlers, by default used Chocofamily\LaravelEventSauce\ConsumerHandler::class
TODO
license. Please see the license file for more information.