SPATIE

  • Products
  • Open Source
  • Courses
  • Web Development
VacanciesAboutBlogDocsGuidelinesMerch ↗ Log in

Docs Laravel-event-sourcing Advanced-usage Using your own event storage repository

Other versions for crawler v7 v6 v5 v4 v3 v2 v1
    • Introduction
    • Support us
    • Requirements
    • Installation & setup
    • Questions and issues
    • Changelog
    • Upgrading
    • Resources and alternatives
    • About us

    Getting familiar with event sourcing

    • Introduction
    • The traditional application
    • Using projectors to transform events
    • Using aggregates to make decisions based on the past

    Using projectors

    • Writing your first projector
    • Creating and registering projectors
    • Making sure events get handled in the right order
    • Thinking in events

    Using reactors

    • Writing your first reactor
    • Creating and configuring reactors

    Using aggregates

    • Writing your first aggregate
    • Creating and configuring aggregates
    • Testing aggregates
    • Snapshots

    Advanced usage

    • Preparing events
    • Replaying events
    • Storing metadata
    • Handling exceptions
    • Discovering projectors and reactors
    • Using your own event storage model
    • Using your own event storage repository
    • Using your own event serializer
    • Using aliases for stored event classes
    • Adding and Removing Projectors and Reactors
    • Aggregate Partials
    • Event Queries
    • Commands

Using your own event storage repository

The default repository responsible for storing events is \Spatie\EventSourcing\StoredEvents\Repositories\EloquentStoredEventRepository. If you want to use a different storage method, implement the \Spatie\EventSourcing\StoredEvents\Repositories\StoredEventRepository repository and add your custom functionality.

Using your own event storage model
Using your own event serializer
Help us improve this page
Event Sourcing in Laravel

Check out our course Event Sourcing

Help us improve this page
  • Products
  • Open Source
  • Courses
  • Web Development
VacanciesAboutBlogDocsGuidelinesMerch ↗ Log in

Kruikstraat 22, Box 12
2018 Antwerp, Belgium
info@spatie.be
+32 3 292 56 79
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter
  • Bluesky
  • Mastodon
  • YouTube
  • Privacy
  • Disclaimer

+32 3 292 56 79

Our office is closed now, email us instead

    Enter a search term to find results in the documentation.