Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Projecting events in Laravel (Laravel Live)

Projecting events in Laravel (Laravel Live)

Freek Van der Herten

March 03, 2019

More Decks by Freek Van der Herten

Other Decks in Programming


  1. About me Freek Van der Herten Partner & developer at

    Spatie @freekmurze https://murze.be https://ohdear.app
  2. Spatie Since 2003 Websites, applications and webshops Team 9 awesome

    human beings Specialisation Laravel, front-end development
  3. We create a lot of it ± 200 packages on

    Packagist ± 2,000,000 downloads a month ± 25,000,000 total downloads All Postcardware!
  4. Traditional application Write data in database An update means overwriting

    the old data The old data cannot be accessed anymore
  5. Using projectors The application will fire off events Events will

    get written in a dedicated store Events are passed to classes that can handle them
  6. Laravel Event Projector It's not full event sourcing, it focuses

    on projections Beautifully integrated into Laravel Easy to get started with
  7. Summary Easy to use package to get started with projections

    Hooks into Laravel's native events Replay capabilities Writes are harder, reads are easier