After using Laravel Pipelines to handle complex data flows in our projects we saw a few patterns emerge:
- Database transactions
- Pipe interface
- Responses and exception handling
This package adds niceties on top of the Laravel Pipeline and consolidates them into a single reusable location.
Looks very close to what we have in
dry-python/returns!https://github.com/zaengle/pipeline
A pipeline is a common pattern for breaking data, logic, and response/exceptions into three distinct elements. Zaengle Pipeline abstracts these parts into helpful classes and gives some structure to the underlying pattern. For example, let's explore at what a pipeline might look like for a ficticious user registration: