Installation
This guide will help you to install the package in your laravel project.
Require package
The first thing to do is to install packet if it has not already been done.
Note
how to install composer
Configuration
Next you need to publish the event sourcing config file.
It will be published to config/event-sourcing.php
Migrations
You can publish the migrations with the following command:
And then run the migrations:Middlewares
Some features need a middleware to work properly.
You should add the middleware to your bootstrap/app.php
file.
use Patchlevel\LaravelEventSourcing\Middleware\EventSourcingMiddleware;
->withMiddleware(static function (Middleware $middleware): void {
$middleware->append(EventSourcingMiddleware::class);
})
Success
You have successfully installed the package! You can now start using the event sourcing library in your laravel project. Start with the quickstart to get a feeling for the package.
Note
This documentation is limited to the package integration. You should also read the library documentation.