Skip to content
← All examples

Application layer

Talred CQRS

A pragmatic CQRS implementation that separates application reads and writes without requiring event sourcing.

  • PHP 8.2+
  • Laravel
  • CQRS
  • Queues
  • PHPStan

What it includes

  • Command and query buses
  • Attribute-based handler discovery
  • Transactions and domain-event dispatch
  • Repository abstractions with caching

Code example

Send an explicit write intent through the command bus and receive a typed result with the resulting data and domain events.

$result = $cqrs->dispatch(new CreateUserCommand(
    name: 'John',
    email: '[email protected]',
    password: 'secret123',
))

$userId = $result->getValue()['id']