PHPackages                             ody/cqrs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ody/cqrs

ActiveLibrary[Framework](/categories/framework)

ody/cqrs
========

CQRS module for ody API framework

0.2.0(1y ago)03MITPHPPHP &gt;=8.3

Since Mar 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ody-dev/cqrs)[ Packagist](https://packagist.org/packages/ody/cqrs)[ RSS](/packages/ody-cqrs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

ODY CQRS
========

[](#ody-cqrs)

A robust and flexible CQRS (Command Query Responsibility Segregation) implementation for the ODY PHP framework.

[![PHP Version](https://camo.githubusercontent.com/7e80c5a44b0f819258f09384c7af693fe7f3f1ebe4ae8c6833b5c34f2dd57d03/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e332d3838393242462e737667)](https://www.php.net/)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)

Overview
--------

[](#overview)

ODY CQRS provides a clean separation between commands (that modify state) and queries (that return data) in your application. This implementation focuses on a synchronous approach for reliable and predictable execution of your domain operations.

Key features:

- **Command Bus**: Process state-changing operations
- **Query Bus**: Handle data retrieval operations
- **Event Bus**: Broadcast and handle domain events
- **Middleware Support**: Extend functionality with custom middleware
- **Attribute-based Registration**: Simple handler declaration with PHP 8 attributes

Installation
------------

[](#installation)

```
composer require ody/cqrs
```

Quick Start
-----------

[](#quick-start)

### 1. Define Commands, Queries, and Events

[](#1-define-commands-queries-and-events)

```
