PHPackages                             litepie/flow - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. litepie/flow

ActiveLibrary

litepie/flow
============

A powerful Laravel package for workflow management with states and transitions

v1.0.2(6mo ago)0362MITPHPPHP ^8.2|^8.3

Since Aug 20Pushed 6mo agoCompare

[ Source](https://github.com/Litepie/Flow)[ Packagist](https://packagist.org/packages/litepie/flow)[ Docs](https://github.com/litepie/flow)[ RSS](/packages/litepie-flow/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (4)Used By (2)

Litepie Flow
============

[](#litepie-flow)

[![Latest Version on Packagist](https://camo.githubusercontent.com/72d6dbc1a3e48bfe27d45e85fae6c9056b629598d9d242b4e4c286955d1f6fe2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6974657069652f666c6f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/litepie/flow)[![Total Downloads](https://camo.githubusercontent.com/1d3e7b6cb933618f0466bc5ece158fb84f0a3fdbe0a9186d7f678cc5a9d5d053/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c6974657069652f666c6f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/litepie/flow)[![License](https://camo.githubusercontent.com/ab41413ec7a184b2287c1df6344c014bee9aa482957e0a86b97f6746bf1d319e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6974657069652f666c6f772e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/litepie/flow)[![Laravel](https://camo.githubusercontent.com/27ffba5000f4972d5ab620fc50c1e7da9a7e241ddc8cf0c0657992edfac6891b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d382e78253743392e7825374331302e7825374331312e782d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](https://laravel.com)

A powerful Laravel package for workflow management with states and transitions. Litepie Flow provides a comprehensive solution for building complex business workflows with state management and event-driven transitions, seamlessly integrated with the [Litepie Actions](https://github.com/litepie/actions) package.

Features
--------

[](#features)

- 🔄 **Workflow Management**: Define complex workflows with states and transitions
- 📊 **State Management**: Track and manage entity states throughout their lifecycle
- ⚙️ **State Machines**: Lightweight state management for individual model attributes
- ⚡ **Event System**: Built-in event handling for workflow transitions
- 🎯 **Action Integration**: Seamless integration with the [Litepie Actions](https://github.com/litepie/actions) package
- 📝 **Database Logging**: Track workflow executions and transition history
- 🚀 **Laravel Integration**: Seamless integration with Laravel's ecosystem
- 🔧 **Extensible**: Easy to extend and customize for your specific needs

Installation
------------

[](#installation)

Install the package via Composer:

```
composer require litepie/flow
```

> **Note**: This will automatically install the required `litepie/actions` dependency.

### Publish and Run Migrations

[](#publish-and-run-migrations)

Publish and run the migrations:

```
php artisan vendor:publish --tag="flow-migrations"
php artisan migrate
```

### Configuration (Optional)

[](#configuration-optional)

Optionally, publish the configuration file:

```
php artisan vendor:publish --tag="flow-config"
```

Quick Start
-----------

[](#quick-start)

### Option 1: Simple State Machine (Recommended for basic state tracking)

[](#option-1-simple-state-machine-recommended-for-basic-state-tracking)

For simple state tracking on model attributes, use state machines:

```
