For the complete documentation index, see llms.txt. This page is also available as Markdown.

CQRS PHP

Command Query Responsibility Segregation PHP

Separate the code that changes state from the code that reads it — clear command and query handlers with zero boilerplate.

Demo

Read Blog Post

Code Example

Registering Command Handlers

Let's create PlaceOrder Command that will place an order in our system.

And Command Handler that will handle this Command

Registering Query Handlers

Let's define GetOrder Query that will find our placed order.

And Query Handlerthat will handle this query

Running The Example

Last updated

Was this helpful?