Download the PHP package darwinnatha/laravel-process without Composer
On this page you can find all versions of the php package darwinnatha/laravel-process. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download darwinnatha/laravel-process
More information about darwinnatha/laravel-process
Files in darwinnatha/laravel-process
Package laravel-process
Short Description A Laravel micro-package based on the pipeline-task pattern for sequential business processes.
License MIT
Informations about the package laravel-process
Laravel Process
A completely flexible and customizable process orchestration package for Laravel.
Structure your business logic as processes composed of tasks with total control over the base implementation.
โจ Key Philosophy
Ultimate Flexibility - Publish and customize everything:
- ๐ฅ Universal Input - Accept any type: Arrays, Objects, Collections, Requests, DTOs, etc.
- ๐ค Universal Output - Return any type: Boolean, Array, DTO, Resource, Collection, null, etc.
- ๐๏ธ Customizable Base Class - Publish AbstractProcess and modify it as needed
- ๐ Zero Constraints - No forced patterns, complete developer freedom
โจ Features
- Publishable Base Class - Customize AbstractProcess to your needs
- Universal Input/Output -
mixedtypes for maximum flexibility - Pipeline-Based - Leverages Laravel's
Pipelinefor task chaining - Automatic Transactions - Built-in DB transaction handling with rollback
- Optional API Formatting - Use
FormatsApiResponsetrait when needed - Artisan Commands - Generate processes and tasks easily
๐ฆ Installation
๐ Quick Start
1. Publish the AbstractProcess (Recommended)
This creates app/Processes/AbstractProcess.php that you can customize:
- Add logging, monitoring, caching
- Modify transaction handling
- Add middleware or custom validation
- Implement your error handling strategy
2. Create a Process
3. Create Tasks
๐ง How It Works
After publishing, your AbstractProcess becomes completely yours to customize. All processes extend from your base class.
Example: Customized AbstractProcess
Example: Your Process
Example: Flexible Task
๐ Usage Examples
With Different Input Types
๐๏ธ Optional API Response Formatting
If you want standardized API responses, use the optional FormatsApiResponse trait:
This is completely optional - by default, return whatever you want!
โ๏ธ Commands
Publish AbstractProcess
Generate Classes
๐ฏ Advanced Customization Examples
Add Caching to Your AbstractProcess
๐งช Testing
Run tests:
The package includes comprehensive tests covering:
- AbstractProcess publication and customization
- Flexible input/output handling
- Different data types (arrays, objects, DTOs, Requests)
- Transaction rollback on failures
- Console command generation
๐งโ๐ป Author
Darwin Piegue (DarwinNatha) ๐ github.com/darwinnatha
โ๏ธ License
MIT License โ free to use, modify, and distribute.
All versions of laravel-process with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/contracts Version *
illuminate/http Version ^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/console Version ^8.0|^9.0|^10.0|^11.0|^12.0