Skip to main content

Events

Baxela is event-driven: significant things that happen emit a domain event, and any module — including yours — can react with a listener. The Core module also observes every dispatched event (e.g. for persistence in the event store).

Event catalog​

Auth​

EventWhen
UserSignedUpEventA user signs up
UserSignedInEventA user signs in
OtpRequestedEventA customer requests an OTP
UserEmailVerifiedEventA user's email is verified
UserActivatedEventA user is activated
UserDeactivatedEventA user is deactivated

Cart​

EventWhen
CartCreatedEventA cart is created
CartItemAddedEventAn item is added to a cart
CartItemRemovedEventAn item is removed from a cart
CartCheckedOutEventA cart is checked out

Catalog​

EventWhen
ProductCreatedEventA product is created
ProductUpdatedEventA product is updated
ProductDeletedEventA product is deleted
ProductActivatedEventA product is activated
ProductDeactivatedEventA product is deactivated
ProductCommentCreatedEventA product comment is posted

Contact​

EventWhen
ContactMessageCreatedEventPublic contact-form submission stored (per-IP rate limited)
ContactMessageStatusUpdatedEventAdmin changed a message status (unread/read/replied/archived)
ContactMessageDeletedEventAdmin deleted a message

Content​

EventWhen
PagePublishedEventA CMS page is published
PageUnpublishedEventA CMS page is unpublished
PostCommentCreatedEventA customer comments on a post

Inventory​

EventWhen
StockIncreasedEventStock is increased
StockDecreasedEventStock is decreased
StockDepletedEventStock reaches zero

Media​

EventWhen
MediaCreatedEventMedia is uploaded
MediaDeletedEventMedia is deleted
EventWhen
MenuCreatedEvent / MenuUpdatedEvent / MenuDeletedEventMenu lifecycle
MenuLinkCreatedEvent / MenuLinkUpdatedEvent / MenuLinkDeletedEventMenu-link lifecycle (updates include reparenting with a circular-move guard; deletion removes the subtree)

Order​

EventWhen
OrderCreatedEventCheckout creates the order (in pending/unpaid)
OrderPaidEventA settled payment marks the order paid
OrderShippedEventThe order is marked shipped
OrderCompletedEventThe order is marked completed
OrderCancelledEventThe order is cancelled — by the customer or by the scheduled expiry command
OrderRefundedEventThe order's payment status moves to refunded
OrderPendingEventReserved contract — not dispatched yet

Payment​

EventWhen
PaymentInitiatedEventA payment is initiated
PaymentSucceededEventA payment succeeds
PaymentFailedEventA payment fails

Setting​

EventWhen
SettingUpdatedEventA setting is updated

Shipping​

EventWhen
ShipmentCreatedEventA shipment is created for an order
ShipmentShippedEventShipment transitions to shipped (the order is marked shipped too)
ShipmentDeliveredEventShipment transitions to delivered (the order is marked completed too)

Support​

EventWhen
TicketCreatedEventA support ticket is created
TicketMessageCreatedEventA customer or admin reply lands
TicketStatusUpdatedEventA ticket's status changes
TicketDeletedEventA ticket is deleted

User​

EventWhen
UserProfileUpdatedEventA user profile is updated

Subscribing​

Register listeners in your module's event service provider as you would in any Laravel application. The per-module reference pages list which events each module emits and listens to today — use them as the contract when adding your own reactions. The Notification module is the canonical example: it subscribes to order, payment, and contact events and delivers them over database/email channels.