Download the PHP package mohamedmohamedhekal/ordermachine without Composer
On this page you can find all versions of the php package mohamedmohamedhekal/ordermachine. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mohamedmohamedhekal/ordermachine
More information about mohamedmohamedhekal/ordermachine
Files in mohamedmohamedhekal/ordermachine
Package ordermachine
Short Description Configurable order lifecycle state machine for Laravel with guards, history, and events
License MIT
Homepage https://github.com/mohamedhekal/ordermachine
Informations about the package ordermachine
OrderMachine
Search terms: laravel, orders, state-machine, fsm, oms, erp, lifecycle, php, laravel-package, order-status, ecommerce, transitions.
Configurable order lifecycle state machine for Laravel OMS/ERP apps: explicit states, guarded transitions, history, and domain events.
Installation
Setup
Ensure your orders table has a status column (configurable).
Usage
Or via facade:
Default graph
pending → confirmed → packed → shipped → delivered
cancel from pending|confirmed|packed
Customize in config/ordermachine.php. Add guards as invokable classes implementing TransitionGuard.
Events
OrderStateTransitioned fires after a successful transition (inside the same DB transaction after history write).
Testing
License
MIT
All versions of ordermachine with dependencies
illuminate/support Version ^11.0|^12.0
illuminate/database Version ^11.0|^12.0
illuminate/events Version ^11.0|^12.0
illuminate/auth Version ^11.0|^12.0
illuminate/contracts Version ^11.0|^12.0