Event class) or message brokers if not carefully scoped. Requires evaluation of duplicate functionality (e.g., if using Laravel’s built-in queues).*Command, *Event) could become a maintenance burden if the codebase evolves or team members are inconsistent.spatie/laravel-event-sourcing)? What unique value does this package provide?config/app.php or a custom provider.MessageBus::dispatch()).database, redis, beanstalkd).Event class or use the package’s native event system.events table) with a migration.spatie/laravel-activitylog for tracking).php artisan queue:work) for background processing.created_at timestamp) before optimizing for append-only or projection needs.Log facade) and monitoring (e.g., laravel-debugbar) early to catch issues.fn() closures).composer require averor/message-bus.php artisan vendor:publish --provider="Averor\MessageBus\MessageBusServiceProvider".*Command, *Event) for the team.App\Commands\Command, App\Events\Event) if needed.$this->app->bind(
'App\Commands\CreateOrderCommand',
fn() => new CreateOrderCommandHandler()
);
MessageBus::dispatch(new CreateOrderCommand($data));
Event:
MessageBus::publish(new OrderCreatedEvent($order));
'message_bus' => [
'queue_connection' => 'redis',
'queue' => 'commands',
]
How can I help you explore Laravel packages today?