Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Event Projector Laravel Package

spatie/laravel-event-projector

Deprecated in favor of spatie/laravel-event-sourcing. Entry-level event sourcing toolkit for Laravel: define aggregates, projectors, and reactors; persist domain events, build read models, and react to events for auditing and reporting-friendly apps.

View on GitHub
Deep Wiki
Context7

title: Using your own event serializer weight: 8

Events will be serialized by the Spatie\EventProjector\EventSerializers\JsonEventSerializer. Like the name implies, this class can serialize an event to json so it can be easily stored in a json column in the database.

You can specify your own serializer by creating a class that implements Spatie\EventProjector\EventSerializers\EventSerializer and specifying the class in the event_serializer key of the event-projector.php config file.

This is the content of the EventSerializer interface:

namespace Spatie\EventProjector\EventSerializers;

use Spatie\EventProjector\ShouldBeStored;

interface EventSerializer
{
    public function serialize(ShouldBeStored $event): string;

    public function deserialize(string $eventClass, string $json): ShouldBeStored;
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport