{"id":95335,"library":"spatie-laravel-event-sourcing","title":"Laravel Event Sourcing","description":"The easiest way to get started with event sourcing in Laravel, providing aggregates, projections, and reactors.","status":"active","version":"7.12.6","language":"php","source_language":null,"source_url":"https://github.com/spatie/laravel-event-sourcing","tags":["laravel","event-sourcing","cqrs","aggregates"],"install":[{"cmd":"composer require spatie/laravel-event-sourcing","lang":"bash","label":"composer require"}],"dependencies":[],"imports":[{"symbol":"AggregateRoot","correct":"use Spatie\\EventSourcing\\AggregateRoots\\AggregateRoot;"}],"quickstart":{"code":"<?php\nnamespace App\\Aggregates;\nuse Spatie\\EventSourcing\\AggregateRoots\\AggregateRoot;\nclass AccountAggregate extends AggregateRoot\n{\n    public function createAccount(string $name): self\n    {\n        $this->recordThat(new AccountCreated($name));\n        return $this;\n    }\n}\n$aggregate = AccountAggregate::retrieve('uuid');\n$aggregate->createAccount('John');\n$aggregate->persist();","lang":"php","description":"Define an aggregate root and record events."},"warnings":[{"fix":"Upgrade Laravel or PHP version.","message":"Requires Laravel 8+ and PHP 8.0+.","severity":"breaking","affected_versions":">=7.0.0"}],"env_vars":null,"search_vec":"'aggreg':16,25 'cqrs':24 'easiest':5 'event':2,11,22 'event-sourc':21 'get':8 'laravel':1,14,20 'project':17 'provid':15 'reactor':19 'sourc':3,12,23 'start':9 'way':6","created_at":"2026-06-19T10:27:35.391195+00:00","updated_at":"2026-06-19T10:27:35.391195+00:00","problems":[],"ecosystem":"packagist","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/spatie/laravel-event-sourcing","github":"https://github.com/spatie/laravel-event-sourcing","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["orm","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-19","next_check":"2026-12-16","install_tag":null}}