{"repo":"spatie/laravel-eventsauce","free":true,"listed":false,"github":"https://github.com/spatie/laravel-eventsauce","clone":"git clone https://github.com/spatie/laravel-eventsauce.git","description":"Use EventSauce in Laravel apps","language":"PHP","stars":121,"topics":["eventsauce","laravel","event-sourcing"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Use EventSauce in Laravel apps EventSauce is an easy way to introduce event sourcing into PHP projects. This package allows EventSauce to make use of Laravel's migrations, models and jobs. It can also help with generating code for commands and events. If you want to use EventSauce in a Laravel app, this package is the way to go! Before using laravel-eventsauce you should already know how to work with EventSauce. Here's a quick example of how to create a new aggregate root and matching repository. Let's run this command: The App\\MyDomain\\MyAggregateRoot and App\\MyDomain\\MyAggregateRootRepository classes will have been created. A migration to create my aggregate root domain messages will have been added to your application too. This is how MyAggregateRootRepository looks like: You can put classnames of consumers in the $consumers array. Consumers in the $queuedConsumers array will called and be passed their messages using a queued job. The MyAggregateRootRepository can be injected and used in any class. In this example we assume you've manually created a performMySpecialCommand method on MyAggregateRoot : Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installa","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/laravel-eventsauce/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}