Weave 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

Broadway Laravel Package

macnificos/broadway

A Laravel/PHP package that integrates Broadway event sourcing and CQRS components into your application, with service-provider wiring and configuration for command buses, domain events, and event stores. Useful for teams adopting event-driven architectures.

Deep Wiki
Context7

macnificos/broadway adds a structured event-broadcasting layer on top of Laravel's native Broadcast system. It wraps broadcastable events in typed messages with predictable payloads, so your frontend receives consistent data across Pusher, Redis, and WebSocket drivers without per-event glue code. Channel authorization and payload shaping stay in one place, keeping controllers and events clean.

  • Driver-agnostic delivery for Pusher, Redis, and Laravel Reverb
  • Typed payload envelopes with automatic serialization
  • Centralized channel authorization helpers
  • Publishable config for connection and naming conventions
  • Works with existing ShouldBroadcast events, no rewrite needed
Frequently asked questions about Broadway
What is macnificos/broadway used for in Laravel?
It is a Laravel integration package for Broadway, the PHP toolkit for CQRS and event sourcing. It provides service provider bindings and configuration so you can connect command buses, event buses, event stores, and read models to a Laravel application. It is aimed at developers building auditable, domain-driven systems where state changes are captured as events.
How do I install macnificos/broadway?
Install it with Composer using composer require macnificos/broadway. Then register the package service provider if your Laravel version does not support package discovery, and publish any provided configuration files. Review the package README and composer.json for exact installation steps and required extensions, such as database drivers for your chosen event store.
Which Laravel versions does macnificos/broadway support?
Laravel version support is defined by the package's composer.json constraints, so check those before installing. The package relies on Laravel's service container and configuration system, and compatibility can vary between major Laravel releases. If you are on a newer Laravel version, verify the package's test suite or run a small integration test in your application.
How do I configure command and event buses with this package?
The package provides service provider bindings and configuration to wire Broadway command and event buses into Laravel's container. You typically configure bus implementations, middleware, and handlers through the published configuration and by binding your own handler classes. Exact keys and supported bus types should be confirmed in the package configuration file and README.
Which event stores can I use with macnificos/broadway?
The package integrates Broadway's event store abstractions, so supported stores depend on the Broadway adapters available in your project. Common options in the Broadway ecosystem include Doctrine DBAL and MongoDB-based stores, but you should confirm the adapters and configuration keys supported by this package. You remain responsible for setting up the underlying database or storage service.
Do I still need to write aggregates and projectors myself?
Yes. macnificos/broadway supplies Laravel infrastructure and testing helpers, not a full domain model generator. You define your aggregates, commands, events, handlers, and read-model projectors using Broadway's APIs and your domain design. The package helps bind those pieces into Laravel and test them more conveniently.
Can I use macnificos/broadway for read models and projections?
Yes, the package is intended to help connect Broadway read models and projections to your Laravel application. You can wire projectors to listen for events and update query-side tables or other read stores. The exact projector registration and event subscription setup depends on the package configuration and your chosen event bus implementation.
How do I test event-sourced Laravel applications with this package?
The package includes testing helpers intended to make Broadway-based CQRS and event sourcing easier to exercise in Laravel tests. You can typically test command handling, event recording, and projection behavior using your normal Laravel test suite with in-memory or test event stores. Check the package's documented helpers and avoid relying on production event stores in unit tests.
Is macnificos/broadway suitable for production use?
It can be used in production when paired with a reliable event store and a clear operational plan for event schema changes and projections. Before adopting it, review the package's release history, test coverage, and Laravel version constraints, since infrastructure packages require ongoing maintenance. Also plan for event store backups, projection rebuilds, and idempotent handlers.
What are alternatives to macnificos/broadway for event sourcing in Laravel?
Alternatives include Spatie's laravel-event-sourcing package, EventSauce integrations, prooph components, and using Broadway directly without a Laravel wrapper. Each option differs in domain modeling style, persistence adapters, and testing support. Choose based on your team's familiarity with Broadway, your required event store, and how much Laravel-specific glue you want the package to provide.
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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle