Skip to content

Instantly share code, notes, and snippets.

@dgafka
Created February 10, 2024 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dgafka/92cad5667976a6ba21bf964ddfb8af24 to your computer and use it in GitHub Desktop.
Save dgafka/92cad5667976a6ba21bf964ddfb8af24 to your computer and use it in GitHub Desktop.
multi-tenancy-19.php
<?php
#[EventSourcingAggregate]
final class Product
{
#[CommandHandler]
public static function register(RegisterProduct $command): array
{
return [
new ProductWasRegistered($command->productId, $command->name)
];
}
(...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment