PHPackages                             changole/laravel-workflows - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. changole/laravel-workflows

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

changole/laravel-workflows
==========================

A Laravel-native workflow engine for modeling business processes with transitions, guards, and audit history.

v1.0.2(2mo ago)0106MITPHPPHP ^8.2CI passing

Since Feb 27Pushed 2mo agoCompare

[ Source](https://github.com/EmmanuelChangole/laravel-workflows)[ Packagist](https://packagist.org/packages/changole/laravel-workflows)[ RSS](/packages/changole-laravel-workflows/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

Laravel Workflows
=================

[](#laravel-workflows)

[![Latest Version on Packagist](https://camo.githubusercontent.com/86974863259dc3cff023d90386b698c770c99c6dcfc304339564ef7a9a846f52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6368616e676f6c652f6c61726176656c2d776f726b666c6f77732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/changole/laravel-workflows)[![Total Downloads](https://camo.githubusercontent.com/7a83060f42e25de8eab3b0bcfa83ca6b451bd694805bec0617270b514ee2e737/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6368616e676f6c652f6c61726176656c2d776f726b666c6f77732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/changole/laravel-workflows)[![License](https://camo.githubusercontent.com/8c040b6f7d315eaabe04429a836b09b9cd03b962bdca737a5ff23f5c40dc3c22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6368616e676f6c652f6c61726176656c2d776f726b666c6f77733f7374796c653d666c61742d737175617265)](https://packagist.org/packages/changole/laravel-workflows)[![Tests](https://github.com/EmmanuelChangole/laravel-workflows/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/EmmanuelChangole/laravel-workflows/actions/workflows/tests.yml)

A lightweight, Laravel-native workflow engine for Eloquent models with explicit transitions, guard validation, events, and audit history.

Supports Laravel 10, 11, and 12.

Features
--------

[](#features)

- Define explicit state transitions for Eloquent models.
- Enforce guard rules before transitions are applied.
- Emit transition lifecycle events for integrations and listeners.
- Keep audit history for transition activity.
- Configure behavior through publishable Laravel config.

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

[](#installation)

You can install the package via composer:

```
composer require changole/laravel-workflows
```

Configuration
-------------

[](#configuration)

### Publishing Config and Migrations

[](#publishing-config-and-migrations)

Publish the package configuration and migrations:

```
php artisan vendor:publish --tag=workflow-config
php artisan vendor:publish --tag=workflow-migrations
php artisan migrate
```

### Config Example

[](#config-example)

```
return [
    'state_field' => 'state',
    'auto_set_initial_state' => true,
    'audit' => [
        'enabled' => true,
    ],
];
```

Usage
-----

[](#usage)

### Define a Workflow

[](#define-a-workflow)

```
