This guide will help you to install the package in your laravel project.
The first thing to do is to install packet if it has not already been done.
composer require patchlevel/laravel-event-sourcing=1.0.0-beta3how to install composer
Next you need to publish the event sourcing config file.
It will be published to config/event-sourcing.php
php artisan vendor:publish --tag patchlevel-configYou can publish the migrations with the following command:
php artisan vendor:publish --tag patchlevel-migrationsAnd then run the migrations:
php artisan migrateSome features need a middleware to work properly.
You should add the middleware to your bootstrap/app.php file.
use Patchlevel\LaravelEventSourcing\Middleware\EventSourcingMiddleware;
$app->withMiddleware(static function (Middleware $middleware): void {
$middleware->append(EventSourcingMiddleware::class);
});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.
This documentation is limited to the package integration. You should also read the library documentation.