Looking to hire Laravel developers? Try LaraJobs

laravel-eventsauce maintained by chocofamilyme

Description
Laravel Eventsauce integration
Last update
2020/03/02 09:56 (dev-master)
License
Downloads
664

Comments
comments powered by Disqus

Requirements

  • PHP ^7.2
  • Laravel ^5.8

Installation

Via Composer

composer require chocofamilyme/laravel-eventsauce

Migrations

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

Configuration

You can publish the config file with the following command:

php artisan vendor:publish --tag="eventsauce-config"

Code Generation

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

Default Connection

The default database connection can be modified by setting the EVENTSAUCE_CONNECTION env variable:

EVENTSAUCE_CONNECTION=mysql

Default Message Table

The default table name for your domain messages can be set with the EVENTSAUCE_TABLE env variable:

EVENTSAUCE_TABLE=domain_messages

Default Snapshot Table

The default table name used to store snapshots can be set with the EVENTSAUCE_SNAPSHOT_TABLE env variable:

EVENTSAUCE_SNAPSHOT_TABLE=snapshots

Default Message Repository

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

Default Snapshot Repository

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

Default Consumer Handler

This class will be used to put message on the handlers, by default used Chocofamily\LaravelEventSauce\ConsumerHandler::class

Usage

TODO

License

license. Please see the license file for more information.